3 #ifndef CDSLIB_CONTAINER_STRIPED_MAP_BOOST_UNORDERED_MAP_ADAPTER_H
4 #define CDSLIB_CONTAINER_STRIPED_MAP_BOOST_UNORDERED_MAP_ADAPTER_H
6 #include <cds/container/striped_set/adapter.h>
7 #include <boost/unordered_map.hpp>
10 namespace cds { namespace container {
11 namespace striped_set {
13 // Copy policy for map
14 template <typename Key, typename T, typename Traits, typename Alloc>
15 struct copy_item_policy< boost::unordered_map< Key, T, Traits, Alloc > >
16 : public details::boost_map_copy_policies<boost::unordered_map< Key, T, Traits, Alloc > >::copy_item_policy
19 // Swap policy for map
20 template <typename Key, typename T, typename Traits, typename Alloc>
21 struct swap_item_policy< boost::unordered_map< Key, T, Traits, Alloc > >
22 : public details::boost_map_copy_policies<boost::unordered_map< Key, T, Traits, Alloc > >::swap_item_policy
25 // Move policy for map
26 template <typename Key, typename T, typename Traits, typename Alloc>
27 struct move_item_policy< boost::unordered_map< Key, T, Traits, Alloc > >
28 : public details::boost_map_copy_policies<boost::unordered_map< Key, T, Traits, Alloc > >::move_item_policy
30 } // namespace striped_set
31 }} // namespace cds::container
33 namespace cds { namespace intrusive { namespace striped_set {
35 /// boost::unordered_map adapter for hash map bucket
36 template <typename Key, typename T, class Hash, class Pred, class Alloc, typename... Options>
37 class adapt< boost::unordered_map< Key, T, Hash, Pred, Alloc>, Options... >
40 typedef boost::unordered_map< Key, T, Hash, Pred, Alloc> container_type ; ///< underlying container type
41 typedef cds::container::striped_set::details::boost_map_adapter< container_type, Options... > type;
43 }}} // namespace cds::intrusive::striped_set
48 #endif // #ifndef CDSLIB_CONTAINER_STRIPED_MAP_BOOST_UNORDERED_MAP_ADAPTER_H