forked from boostorg/intrusive
Split detail/utilities.hpp into 11 headers to minimize physical coupling and header dependencies
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/slist_hook.hpp>
|
||||
#include <boost/intrusive/options.hpp>
|
||||
@@ -142,6 +142,11 @@ struct unordered_algorithms
|
||||
}
|
||||
};
|
||||
|
||||
//Class to avoid defining the same algo as a circular list, as hooks would be ambiguous between them
|
||||
template<class Algo>
|
||||
struct uset_algo_wrapper : public Algo
|
||||
{};
|
||||
|
||||
template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
|
||||
struct get_uset_node_algo
|
||||
{
|
||||
@@ -151,9 +156,9 @@ struct get_uset_node_algo
|
||||
, slist_node_traits<VoidPointer>
|
||||
>::type node_traits_type;
|
||||
typedef typename detail::if_c
|
||||
< OptimizeMultiKey
|
||||
, unordered_algorithms<node_traits_type>
|
||||
, circular_slist_algorithms<node_traits_type>
|
||||
< OptimizeMultiKey
|
||||
, unordered_algorithms<node_traits_type>
|
||||
, uset_algo_wrapper< circular_slist_algorithms<node_traits_type> >
|
||||
>::type type;
|
||||
};
|
||||
/// @endcond
|
||||
@@ -178,10 +183,10 @@ struct make_unordered_set_base_hook
|
||||
>::type packed_options;
|
||||
|
||||
typedef generic_hook
|
||||
< get_uset_node_algo<typename packed_options::void_pointer
|
||||
, packed_options::store_hash
|
||||
, packed_options::optimize_multikey
|
||||
>
|
||||
< typename get_uset_node_algo < typename packed_options::void_pointer
|
||||
, packed_options::store_hash
|
||||
, packed_options::optimize_multikey
|
||||
>::type
|
||||
, typename packed_options::tag
|
||||
, packed_options::link_mode
|
||||
, HashBaseHookId
|
||||
@@ -317,10 +322,10 @@ struct make_unordered_set_member_hook
|
||||
>::type packed_options;
|
||||
|
||||
typedef generic_hook
|
||||
< get_uset_node_algo< typename packed_options::void_pointer
|
||||
, packed_options::store_hash
|
||||
, packed_options::optimize_multikey
|
||||
>
|
||||
< typename get_uset_node_algo< typename packed_options::void_pointer
|
||||
, packed_options::store_hash
|
||||
, packed_options::optimize_multikey
|
||||
>::type
|
||||
, member_tag
|
||||
, packed_options::link_mode
|
||||
, NoBaseHookId
|
||||
|
||||
Reference in New Issue
Block a user