forked from boostorg/intrusive
Removed unneeded template parameters to tree_value_compare to reduce symbol length.
This commit is contained in:
@@ -262,7 +262,7 @@ struct bst_key_types
|
|||||||
, key_type
|
, key_type
|
||||||
>::type key_compare;
|
>::type key_compare;
|
||||||
typedef tree_value_compare
|
typedef tree_value_compare
|
||||||
<key_type, T, key_compare, key_of_value> value_compare;
|
<key_compare, key_of_value> value_compare;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, algo_types AlgoType, typename HeaderHolder>
|
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, algo_types AlgoType, typename HeaderHolder>
|
||||||
|
@@ -27,15 +27,16 @@ namespace intrusive{
|
|||||||
|
|
||||||
//This function object takes a KeyCompare function object
|
//This function object takes a KeyCompare function object
|
||||||
//and compares values that contains keys using KeyOfValue
|
//and compares values that contains keys using KeyOfValue
|
||||||
template<class Key, class T, class KeyCompare, class KeyOfValue>
|
template<class KeyCompare, class KeyOfValue>
|
||||||
struct tree_value_compare
|
struct tree_value_compare
|
||||||
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
||||||
{
|
{
|
||||||
typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
|
|
||||||
typedef T value_type;
|
|
||||||
typedef KeyCompare key_compare;
|
typedef KeyCompare key_compare;
|
||||||
typedef KeyOfValue key_of_value;
|
typedef KeyOfValue key_of_value;
|
||||||
typedef Key key_type;
|
typedef typename KeyOfValue::type key_type;
|
||||||
|
|
||||||
|
typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
|
||||||
|
|
||||||
|
|
||||||
BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
|
BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
|
||||||
: base_t()
|
: base_t()
|
||||||
@@ -62,19 +63,19 @@ struct tree_value_compare
|
|||||||
{ return static_cast<key_compare &>(*this); }
|
{ return static_cast<key_compare &>(*this); }
|
||||||
|
|
||||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
|
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
|
||||||
{ return key_compare::operator()(key1, key2); }
|
{ return this->key_comp()(key1, key2); }
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
|
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
|
||||||
{ return key_compare::operator()(key1, KeyOfValue()(nonkey2)); }
|
{ return this->key_comp()()(key1, KeyOfValue()(nonkey2)); }
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
|
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
|
||||||
{ return key_compare::operator()(KeyOfValue()(nonkey1), key2); }
|
{ return this->key_comp()(KeyOfValue()(nonkey1), key2); }
|
||||||
|
|
||||||
template<class U, class V>
|
template<class U, class V>
|
||||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
|
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
|
||||||
{ return key_compare::operator()(KeyOfValue()(nonkey1), KeyOfValue()(nonkey2)); }
|
{ return this->key_comp()(KeyOfValue()(nonkey1), KeyOfValue()(nonkey2)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace intrusive{
|
} //namespace intrusive{
|
||||||
|
Reference in New Issue
Block a user