]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/test/apply_member_pointer_constraints.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / callable_traits / test / apply_member_pointer_constraints.cpp
1 /*<-
2 Copyright (c) 2016 Barrett Adair
3
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)
6 ->*/
7
8 #include <boost/callable_traits/apply_member_pointer.hpp>
9 #include "test.hpp"
10
11 struct foo;
12
13 template<typename T, typename U>
14 struct is_substitution_failure_apply_member_pointer {
15
16 template<typename, typename>
17 static auto test(...) -> std::true_type;
18
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;
23
24 static constexpr bool value = decltype(test<T, U>(0))::value;
25 };
26
27 int main() {
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);
31 }
32