Unordered: Use return type SFINAE, seems to be more portable.

[SVN r74182]
This commit is contained in:
Daniel James
2011-09-01 08:26:36 +00:00
parent 1154b5729a
commit 26a47d33c1

View File

@ -225,17 +225,16 @@ namespace boost { namespace unordered { namespace detail {
\ \
template <BOOST_PP_CAT(check, count) e> \ template <BOOST_PP_CAT(check, count) e> \
struct BOOST_PP_CAT(test, count) { \ struct BOOST_PP_CAT(test, count) { \
typedef void* type; \ typedef BOOST_PP_CAT(choice, result) type; \
}; \ }; \
\ \
template <class U> static BOOST_PP_CAT(choice, result)::type \ template <class U> static BOOST_DEDUCED_TYPENAME \
test(BOOST_PP_CAT(choice, count), \ BOOST_PP_CAT(test, count)<&U::name>::type \
typename BOOST_PP_CAT(test, count)< \ test(BOOST_PP_CAT(choice, count))
&U::name>::type = 0)
#define BOOST_UNORDERED_DEFAULT_MEMBER(count, result) \ #define BOOST_UNORDERED_DEFAULT_MEMBER(count, result) \
template <class U> static BOOST_PP_CAT(choice, result)::type \ template <class U> static BOOST_PP_CAT(choice, result)::type \
test(BOOST_PP_CAT(choice, count), void* = 0) test(BOOST_PP_CAT(choice, count))
template <typename T> template <typename T>