3 #ifndef __CDS_CONTAINER_STRIPED_MAP_BOOST_FLAT_MAP_ADAPTER_H
4 #define __CDS_CONTAINER_STRIPED_MAP_BOOST_FLAT_MAP_ADAPTER_H
6 #include <boost/version.hpp>
7 #if BOOST_VERSION < 104800
8 # error "For boost::container::flat_map you must use boost 1.48 or above"
11 #include <cds/container/striped_set/adapter.h>
12 #include <boost/container/flat_map.hpp>
14 //#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION >= 1700
15 //# error "boost::container::flat_map is not compatible with MS VC++ 11"
20 namespace cds { namespace container {
21 namespace striped_set {
23 // Copy policy for map
24 template <typename Key, typename T, typename Traits, typename Alloc>
25 struct copy_item_policy< boost::container::flat_map< Key, T, Traits, Alloc > >
26 : public details::boost_map_copy_policies<boost::container::flat_map< Key, T, Traits, Alloc > >::copy_item_policy
30 template <typename Key, typename T, typename Traits, typename Alloc>
31 struct swap_item_policy< boost::container::flat_map< Key, T, Traits, Alloc > >
32 : public details::boost_map_copy_policies<boost::container::flat_map< Key, T, Traits, Alloc > >::swap_item_policy
35 // Move policy for map
36 template <typename Key, typename T, typename Traits, typename Alloc>
37 struct move_item_policy< boost::container::flat_map< Key, T, Traits, Alloc > >
38 : public details::boost_map_copy_policies<boost::container::flat_map< Key, T, Traits, Alloc > >::move_item_policy
40 } // namespace striped_set
41 }} // namespace cds::container
43 namespace cds { namespace intrusive { namespace striped_set {
45 template <typename Key, typename T, class Traits, class Alloc, typename... Options>
46 class adapt< boost::container::flat_map< Key, T, Traits, Alloc>, Options... >
49 typedef boost::container::flat_map< Key, T, Traits, Alloc> container_type ; ///< underlying container type
50 typedef cds::container::striped_set::details::boost_map_adapter< container_type, Options... > type;
52 }}} // namespace cds::intrusive::striped_set
56 #endif // #ifndef __CDS_CONTAINER_STRIPED_MAP_BOOST_FLAT_MAP_ADAPTER_H