1
0
forked from boostorg/core

Revert "Slightly more succint sfinae expressions"

This commit is contained in:
Glen Fernandes
2017-06-11 10:53:28 -04:00
parent 6153eebc42
commit cccac1d631

View File

@ -172,14 +172,19 @@ namespace detail {
template<class T> template<class T>
T addressof_declval() BOOST_NOEXCEPT; T addressof_declval() BOOST_NOEXCEPT;
template<class>
struct addressof_void {
typedef void type;
};
template<class T, class E = void> template<class T, class E = void>
struct addressof_member_operator { struct addressof_member_operator {
static constexpr bool value = false; static constexpr bool value = false;
}; };
template<class T> template<class T>
struct addressof_member_operator<T, struct addressof_member_operator<T, typename
decltype(addressof_declval<T&>().operator&(), void())> { addressof_void<decltype(addressof_declval<T&>().operator&())>::type> {
static constexpr bool value = true; static constexpr bool value = true;
}; };
@ -196,8 +201,8 @@ struct addressof_non_member_operator {
}; };
template<class T> template<class T>
struct addressof_non_member_operator<T, struct addressof_non_member_operator<T, typename
decltype(operator&(addressof_declval<T&>()), void())> { addressof_void<decltype(operator&(addressof_declval<T&>()))>::type> {
static constexpr bool value = true; static constexpr bool value = true;
}; };
@ -208,7 +213,7 @@ struct addressof_expression {
template<class T> template<class T>
struct addressof_expression<T, struct addressof_expression<T,
decltype(&addressof_declval<T&>(), void())> { typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
static constexpr bool value = true; static constexpr bool value = true;
}; };