]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/test/class_of.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / callable_traits / test / class_of.cpp
1 #include <tuple>
2 #include <utility>
3 #include <type_traits>
4 #include <boost/callable_traits/class_of.hpp>
5 #include "test.hpp"
6
7 struct foo;
8
9 int main() {
10
11 {
12 using f = void(foo::*)();
13 using test = TRAIT(class_of, f);
14 using expect = foo;
15 CT_ASSERT(std::is_same<test, expect>::value);
16 }
17
18 {
19 using f = void(foo::*)() const;
20 using test = TRAIT(class_of, f);
21 using expect = foo;
22 CT_ASSERT(std::is_same<test, expect>::value);
23 }
24
25 {
26 using f = void(foo::*)() volatile;
27 using test = TRAIT(class_of, f);
28 using expect = foo;
29 CT_ASSERT(std::is_same<test, expect>::value);
30 }
31
32 {
33 using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int, ...) const volatile;
34 using test = TRAIT(class_of, f);
35 using expect = foo;
36 CT_ASSERT(std::is_same<test, expect>::value);
37 }
38
39 {
40 using f = int foo::*;
41 using test = TRAIT(class_of, f);
42 using expect = foo;
43 CT_ASSERT(std::is_same<test, expect>::value);
44 }
45
46 {
47 using f = const int foo::*;
48 using test = TRAIT(class_of, f);
49 using expect = foo;
50 CT_ASSERT(std::is_same<test, expect>::value);
51 }
52 }