]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/intrusive/test/bs_test_common.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / intrusive / test / bs_test_common.hpp
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2015-2015.
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/intrusive for documentation.
10 //
11 /////////////////////////////////////////////////////////////////////////////
12 #ifndef BOOST_INTRUSIVE_TEST_BS_TEST_COMMON_HPP
13 #define BOOST_INTRUSIVE_TEST_BS_TEST_COMMON_HPP
14
15 #include <boost/intrusive/bs_set_hook.hpp>
16 #include <boost/intrusive/detail/mpl.hpp>
17 #include "bptr_value.hpp"
18 #include "test_common.hpp"
19
20 namespace boost {
21 namespace intrusive {
22
23 template<class VoidPointer>
24 struct bs_hooks
25 {
26 typedef bs_set_base_hook<void_pointer<VoidPointer> > base_hook_type;
27 typedef bs_set_base_hook
28 <link_mode<auto_unlink>
29 , void_pointer<VoidPointer>
30 , tag<void> > auto_base_hook_type;
31 typedef bs_set_member_hook
32 <void_pointer<VoidPointer> > member_hook_type;
33 typedef bs_set_member_hook
34 < link_mode<auto_unlink>
35 , void_pointer<VoidPointer> > auto_member_hook_type;
36 typedef nonhook_node_member< tree_node_traits<VoidPointer>,
37 bstree_algorithms
38 > nonhook_node_member_type;
39 };
40
41 template < class ValueTraits, bool DefaultHolder, bool Map >
42 struct tree_rebinder_common
43 {
44 typedef typename ValueTraits::value_type value_type;
45 typedef typename detail::if_c
46 < DefaultHolder
47 , typename detail::if_c
48 < detail::is_same<value_type, BPtr_Value>::value
49 , header_holder_type< bounded_pointer_holder< BPtr_Value > >
50 , void
51 >::type
52 , header_holder_type< heap_node_holder< typename ValueTraits::node_ptr > >
53 >::type holder_opt;
54 typedef typename detail::if_c
55 < Map, key_of_value<int_holder_key_of_value<value_type> >, void
56 >::type key_of_value_opt;
57 };
58
59
60 } //namespace intrusive {
61 } //namespace boost {
62
63 #endif //BOOST_INTRUSIVE_TEST_BS_TEST_COMMON_HPP