]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/container/include/boost/container/options.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / container / include / boost / container / options.hpp
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2013-2013
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //
9 // See http://www.boost.org/libs/container for documentation.
10 //
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef BOOST_CONTAINER_OPTIONS_HPP
14 #define BOOST_CONTAINER_OPTIONS_HPP
15
16 #ifndef BOOST_CONFIG_HPP
17 # include <boost/config.hpp>
18 #endif
19
20 #if defined(BOOST_HAS_PRAGMA_ONCE)
21 # pragma once
22 #endif
23
24 #include <boost/container/detail/config_begin.hpp>
25 #include <boost/container/container_fwd.hpp>
26 #include <boost/intrusive/pack_options.hpp>
27
28 namespace boost {
29 namespace container {
30
31 #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
32
33 template<tree_type_enum TreeType, bool OptimizeSize>
34 struct tree_opt
35 {
36 static const boost::container::tree_type_enum tree_type = TreeType;
37 static const bool optimize_size = OptimizeSize;
38 };
39
40 #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
41
42 //!This option setter specifies the underlying tree type
43 //!(red-black, AVL, Scapegoat or Splay) for ordered associative containers
44 BOOST_INTRUSIVE_OPTION_CONSTANT(tree_type, tree_type_enum, TreeType, tree_type)
45
46 //!This option setter specifies if node size is optimized
47 //!storing rebalancing data masked into pointers for ordered associative containers
48 BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size)
49
50 //! Helper metafunction to combine options into a single type to be used
51 //! by \c boost::container::set, \c boost::container::multiset
52 //! \c boost::container::map and \c boost::container::multimap.
53 //! Supported options are: \c boost::container::optimize_size and \c boost::container::tree_type
54 #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
55 template<class ...Options>
56 #else
57 template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
58 #endif
59 struct tree_assoc_options
60 {
61 /// @cond
62 typedef typename ::boost::intrusive::pack_options
63 < tree_assoc_defaults,
64 #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
65 O1, O2, O3, O4
66 #else
67 Options...
68 #endif
69 >::type packed_options;
70 typedef tree_opt<packed_options::tree_type, packed_options::optimize_size> implementation_defined;
71 /// @endcond
72 typedef implementation_defined type;
73 };
74
75 } //namespace container {
76 } //namespace boost {
77
78 #include <boost/container/detail/config_end.hpp>
79
80 #endif //#ifndef BOOST_CONTAINER_OPTIONS_HPP