From 1d5c367d62d2f3d2fcfb5c8749f254c3e540e052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 17 Oct 2015 09:39:56 +0200 Subject: [PATCH] Use BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN as some compilers prefer return type SFINAE while others don't support it. --- include/boost/container/detail/tree.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/boost/container/detail/tree.hpp b/include/boost/container/detail/tree.hpp index 956e460..2f35c27 100644 --- a/include/boost/container/detail/tree.hpp +++ b/include/boost/container/detail/tree.hpp @@ -408,13 +408,20 @@ struct key_node_compare }; template - const typename KeyValueCompare::value_type & - key_forward(const T &node, typename enable_if_c::value>::type* =0) const + typename enable_if_c::value, const typename KeyValueCompare::value_type &>::type + key_forward(const T &node) const { return node.get_data(); } + #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) template const T &key_forward(const T &key, typename enable_if_c::value>::type* =0) const { return key; } + #else + template + typename enable_if_c::value, const T &>::type + key_forward(const T &key) const + { return key; } + #endif template bool operator()(const KeyType &key1, const KeyType2 &key2) const