mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Use BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN as some compilers prefer return type SFINAE while others don't support it.
This commit is contained in:
@@ -408,13 +408,20 @@ struct key_node_compare
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
const typename KeyValueCompare::value_type &
|
typename enable_if_c<is_node<T>::value, const typename KeyValueCompare::value_type &>::type
|
||||||
key_forward(const T &node, typename enable_if_c<is_node<T>::value>::type* =0) const
|
key_forward(const T &node) const
|
||||||
{ return node.get_data(); }
|
{ return node.get_data(); }
|
||||||
|
|
||||||
|
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
||||||
template<class T>
|
template<class T>
|
||||||
const T &key_forward(const T &key, typename enable_if_c<!is_node<T>::value>::type* =0) const
|
const T &key_forward(const T &key, typename enable_if_c<!is_node<T>::value>::type* =0) const
|
||||||
{ return key; }
|
{ return key; }
|
||||||
|
#else
|
||||||
|
template<class T>
|
||||||
|
typename enable_if_c<!is_node<T>::value, const T &>::type
|
||||||
|
key_forward(const T &key) const
|
||||||
|
{ return key; }
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class KeyType, class KeyType2>
|
template<class KeyType, class KeyType2>
|
||||||
bool operator()(const KeyType &key1, const KeyType2 &key2) const
|
bool operator()(const KeyType &key1, const KeyType2 &key2) const
|
||||||
|
Reference in New Issue
Block a user