From a91afcbde4b82f8643ce78095c8c8cf6261aedbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 17 Oct 2015 09:39:34 +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/intrusive/detail/key_nodeptr_comp.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/boost/intrusive/detail/key_nodeptr_comp.hpp b/include/boost/intrusive/detail/key_nodeptr_comp.hpp index 98660c7..171a2e8 100644 --- a/include/boost/intrusive/detail/key_nodeptr_comp.hpp +++ b/include/boost/intrusive/detail/key_nodeptr_comp.hpp @@ -60,14 +60,18 @@ struct key_nodeptr_comp //key_forward template - const key_type &key_forward - (const T &node, typename enable_if >::type* =0) const + typename enable_if, const key_type &>::type key_forward(const T &node) const { return key_of_value()(*traits_->to_value_ptr(node)); } + #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) template - const T &key_forward - (const T &key, typename disable_if >::type* =0) const + const T &key_forward (const T &key, typename disable_if >::type* =0) const { return key; } + #else + template + typename disable_if, const T &>::type key_forward(const T &key) const + { return key; } + #endif //operator() 1 arg template