2 Copyright (c) 2016 Barrett Adair
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 #include <boost/callable_traits/apply_member_pointer.hpp>
13 template<typename T
, typename U
>
14 struct is_substitution_failure_apply_member_pointer
{
16 template<typename
, typename
>
17 static auto test(...) -> std::true_type
;
19 template<typename A
, typename B
,
20 typename
std::remove_reference
<
21 TRAIT(apply_member_pointer
, A
, B
)>::type
* = nullptr>
22 static auto test(int) -> std::false_type
;
24 static constexpr bool value
= decltype(test
<T
, U
>(0))::value
;
28 CT_ASSERT(is_substitution_failure_apply_member_pointer
<void, foo
>::value
);
29 CT_ASSERT(is_substitution_failure_apply_member_pointer
<int, int>::value
);
30 CT_ASSERT(is_substitution_failure_apply_member_pointer
<void, int>::value
);