From 26a47d33c139b91ae92c24d6f94b420775ec12d0 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 1 Sep 2011 08:26:36 +0000 Subject: [PATCH] Unordered: Use return type SFINAE, seems to be more portable. [SVN r74182] --- include/boost/unordered/detail/allocator_helpers.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/boost/unordered/detail/allocator_helpers.hpp b/include/boost/unordered/detail/allocator_helpers.hpp index 88dfde6f..c09a3381 100644 --- a/include/boost/unordered/detail/allocator_helpers.hpp +++ b/include/boost/unordered/detail/allocator_helpers.hpp @@ -225,17 +225,16 @@ namespace boost { namespace unordered { namespace detail { \ template \ struct BOOST_PP_CAT(test, count) { \ - typedef void* type; \ + typedef BOOST_PP_CAT(choice, result) type; \ }; \ \ - template static BOOST_PP_CAT(choice, result)::type \ - test(BOOST_PP_CAT(choice, count), \ - typename BOOST_PP_CAT(test, count)< \ - &U::name>::type = 0) + template static BOOST_DEDUCED_TYPENAME \ + BOOST_PP_CAT(test, count)<&U::name>::type \ + test(BOOST_PP_CAT(choice, count)) #define BOOST_UNORDERED_DEFAULT_MEMBER(count, result) \ template static BOOST_PP_CAT(choice, result)::type \ - test(BOOST_PP_CAT(choice, count), void* = 0) + test(BOOST_PP_CAT(choice, count)) template