2 Copyright Barrett Adair 2016-2017
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
10 #include <boost/callable_traits/add_member_cv.hpp>
18 using f
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...);
19 using l
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) LREF
;
20 using r
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) RREF
;
21 using c
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const;
22 using cl
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const LREF
;
23 using cr
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const RREF
;
24 using v
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) volatile;
25 using vl
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) volatile LREF
;
26 using vr
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) volatile RREF
;
27 using cv
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const volatile;
28 using cvl
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const volatile LREF
;
29 using cvr
= void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
foo::*)(...) const volatile RREF
;
31 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, f
)>{});
32 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, c
)>{});
33 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, l
)>{});
34 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cl
)>{});
35 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, r
)>{});
36 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cr
)>{});
37 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, v
)>{});
38 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, cv
)>{});
39 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, vl
)>{});
40 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cvl
)>{});
41 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, vr
)>{});
42 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cvr
)>{});
46 using f
= void(foo::*)(int, int);
47 using l
= void(foo::*)(int, int) LREF
;
48 using r
= void(foo::*)(int, int) RREF
;
49 using c
= void(foo::*)(int, int) const;
50 using cl
= void(foo::*)(int, int) const LREF
;
51 using cr
= void(foo::*)(int, int) const RREF
;
52 using v
= void(foo::*)(int, int) volatile;
53 using vl
= void(foo::*)(int, int) volatile LREF
;
54 using vr
= void(foo::*)(int, int) volatile RREF
;
55 using cv
= void(foo::*)(int, int) const volatile;
56 using cvl
= void(foo::*)(int, int) const volatile LREF
;
57 using cvr
= void(foo::*)(int, int) const volatile RREF
;
59 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, f
)>{});
60 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, c
)>{});
61 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, l
)>{});
62 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cl
)>{});
63 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, r
)>{});
64 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cr
)>{});
65 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, v
)>{});
66 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, cv
)>{});
67 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, vl
)>{});
68 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cvl
)>{});
69 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, vr
)>{});
70 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cvr
)>{});
73 #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
77 using l
= void() LREF
;
78 using r
= void() RREF
;
79 using c
= void() const;
80 using cl
= void() const LREF
;
81 using cr
= void() const RREF
;
82 using v
= void() volatile;
83 using vl
= void() volatile LREF
;
84 using vr
= void() volatile RREF
;
85 using cv
= void() const volatile;
86 using cvl
= void() const volatile LREF
;
87 using cvr
= void() const volatile RREF
;
89 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, f
)>{});
90 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, c
)>{});
91 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, l
)>{});
92 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cl
)>{});
93 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, r
)>{});
94 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cr
)>{});
95 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, v
)>{});
96 CT_ASSERT(std::is_same
<cv
, TRAIT(add_member_cv
, cv
)>{});
97 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, vl
)>{});
98 CT_ASSERT(std::is_same
<cvl
, TRAIT(add_member_cv
, cvl
)>{});
99 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, vr
)>{});
100 CT_ASSERT(std::is_same
<cvr
, TRAIT(add_member_cv
, cvr
)>{});
103 #endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS