]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/circular_buffer/include/boost/circular_buffer.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / circular_buffer / include / boost / circular_buffer.hpp
CommitLineData
7c673cae
FG
1// Circular buffer library header file.
2
3// Copyright (c) 2003-2008 Jan Gaspar
4
5// Use, modification, and distribution is subject to the Boost Software
6// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8
9// See www.boost.org/libs/circular_buffer for documentation.
10
11#if !defined(BOOST_CIRCULAR_BUFFER_HPP)
12#define BOOST_CIRCULAR_BUFFER_HPP
13
14#if defined(_MSC_VER)
15 #pragma once
16#endif
17
18#include <boost/circular_buffer_fwd.hpp>
19#include <boost/detail/workaround.hpp>
20#include <boost/static_assert.hpp>
21
22// BOOST_CB_ENABLE_DEBUG: Debug support control.
23#if !defined(BOOST_CB_ENABLE_DEBUG)
24 #define BOOST_CB_ENABLE_DEBUG 0
25#endif
26
27// BOOST_CB_ASSERT: Runtime assertion.
28#if BOOST_CB_ENABLE_DEBUG
29 #include <boost/assert.hpp>
30 #define BOOST_CB_ASSERT(Expr) BOOST_ASSERT(Expr)
31#else
32 #define BOOST_CB_ASSERT(Expr) ((void)0)
33#endif
34
35// BOOST_CB_IS_CONVERTIBLE: Check if Iterator::value_type is convertible to Type.
36#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0550) || BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
37 #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) ((void)0)
38#else
39 #include <boost/detail/iterator.hpp>
40 #include <boost/type_traits/is_convertible.hpp>
41 #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) \
42 BOOST_STATIC_ASSERT((is_convertible<typename detail::iterator_traits<Iterator>::value_type, Type>::value))
43#endif
44
45// BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS:
46// Check if the STL provides templated iterator constructors for its containers.
47#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
48 #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS BOOST_STATIC_ASSERT(false);
49#else
50 #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS ((void)0);
51#endif
52
53#include <boost/circular_buffer/debug.hpp>
54#include <boost/circular_buffer/details.hpp>
55#include <boost/circular_buffer/base.hpp>
56#include <boost/circular_buffer/space_optimized.hpp>
57
58#undef BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS
59#undef BOOST_CB_IS_CONVERTIBLE
60#undef BOOST_CB_ASSERT
61
62#endif // #if !defined(BOOST_CIRCULAR_BUFFER_HPP)