3 #ifndef __CDS_CONTAINER_STRIPED_MAP_BOOST_MAP_ADAPTER_H
4 #define __CDS_CONTAINER_STRIPED_MAP_BOOST_MAP_ADAPTER_H
6 #include <boost/version.hpp>
7 #if BOOST_VERSION < 104800
8 # error "For boost::container::map you must use boost 1.48 or above"
11 #include <cds/container/striped_set/adapter.h>
12 #include <boost/container/map.hpp>
15 namespace cds { namespace container {
16 namespace striped_set {
18 // Copy policy for map
19 template <typename Key, typename T, typename Traits, typename Alloc>
20 struct copy_item_policy< boost::container::map< Key, T, Traits, Alloc > >
21 : public details::boost_map_copy_policies<boost::container::map< Key, T, Traits, Alloc > >::copy_item_policy
25 template <typename Key, typename T, typename Traits, typename Alloc>
26 struct swap_item_policy< boost::container::map< Key, T, Traits, Alloc > >
27 : public details::boost_map_copy_policies<boost::container::map< Key, T, Traits, Alloc > >::swap_item_policy
30 #ifdef CDS_MOVE_SEMANTICS_SUPPORT
31 // Move policy for map
32 template <typename Key, typename T, typename Traits, typename Alloc>
33 struct move_item_policy< boost::container::map< Key, T, Traits, Alloc > >
34 : public details::boost_map_copy_policies<boost::container::map< Key, T, Traits, Alloc > >::move_item_policy
37 } // namespace striped_set
38 }} // namespace cds::container
40 namespace cds { namespace intrusive { namespace striped_set {
42 /// std::set adapter for hash set bucket
43 template <typename Key, typename T, class Traits, class Alloc, CDS_SPEC_OPTIONS>
44 class adapt< boost::container::map< Key, T, Traits, Alloc>, CDS_OPTIONS >
47 typedef boost::container::map< Key, T, Traits, Alloc> container_type ; ///< underlying container type
48 typedef cds::container::striped_set::details::boost_map_adapter< container_type, CDS_OPTIONS > type;
50 }}} // namespace cds::intrusive::striped_set
54 #endif // #ifndef __CDS_CONTAINER_STRIPED_MAP_BOOST_MAP_ADAPTER_H