3 #ifndef CDSLIB_CONTAINER_STRIPED_SET_BOOST_FLAT_SET_ADAPTER_H
4 #define CDSLIB_CONTAINER_STRIPED_SET_BOOST_FLAT_SET_ADAPTER_H
6 #include <boost/version.hpp>
7 #if BOOST_VERSION < 104800
8 # error "For boost::container::flat_set you must use boost 1.48 or above"
11 #include <cds/container/striped_set/adapter.h>
12 #include <boost/container/flat_set.hpp>
14 //#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION >= 1700
15 //# error "boost::container::flat_set is not compatible with MS VC++ 11"
19 namespace cds { namespace container {
20 namespace striped_set {
22 // Copy policy for boost::container::flat_set
23 template <typename T, typename Traits, typename Alloc>
24 struct copy_item_policy< boost::container::flat_set< T, Traits, Alloc > >
25 : public details::boost_set_copy_policies< boost::container::flat_set< T, Traits, Alloc > >::copy_item_policy
28 // Swap policy is not defined for boost::container::flat_set
29 template <typename T, typename Traits, typename Alloc>
30 struct swap_item_policy< boost::container::flat_set< T, Traits, Alloc > >
31 : public details::boost_set_copy_policies< boost::container::flat_set< T, Traits, Alloc > >::swap_item_policy
34 // Move policy for boost::container::flat_set
35 template <typename T, typename Traits, typename Alloc>
36 struct move_item_policy< boost::container::flat_set< T, Traits, Alloc > >
37 : public details::boost_set_copy_policies< boost::container::flat_set< T, Traits, Alloc > >::move_item_policy
40 } // namespace striped_set
41 }} // namespace cds::container
43 namespace cds { namespace intrusive { namespace striped_set {
44 template <typename T, class Traits, class Alloc, typename... Options>
45 class adapt< boost::container::flat_set<T, Traits, Alloc>, Options... >
48 typedef boost::container::flat_set<T, Traits, Alloc> container_type ; ///< underlying container type
49 typedef cds::container::striped_set::details::boost_set_adapter< container_type, Options... > type;
55 #endif // #ifndef CDSLIB_CONTAINER_STRIPED_SET_BOOST_FLAT_SET_ADAPTER_H