Minimize ifdef-ed code for BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN

This commit is contained in:
Ion Gaztañaga
2015-10-17 10:18:51 +02:00
parent a91afcbde4
commit ea47994cc0

View File

@@ -63,15 +63,13 @@ struct key_nodeptr_comp
typename enable_if<is_node_ptr<T>, const key_type &>::type key_forward(const T &node) const typename enable_if<is_node_ptr<T>, const key_type &>::type key_forward(const T &node) const
{ return key_of_value()(*traits_->to_value_ptr(node)); } { return key_of_value()(*traits_->to_value_ptr(node)); }
template<class T>
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
template<class T>
const T &key_forward (const T &key, typename disable_if<is_node_ptr<T> >::type* =0) const const T &key_forward (const T &key, typename disable_if<is_node_ptr<T> >::type* =0) const
{ return key; }
#else #else
template<class T>
typename disable_if<is_node_ptr<T>, const T &>::type key_forward(const T &key) const typename disable_if<is_node_ptr<T>, const T &>::type key_forward(const T &key) const
{ return key; }
#endif #endif
{ return key; }
//operator() 1 arg //operator() 1 arg
template<class KeyType> template<class KeyType>