| 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/detail/config.hpp> |
| 9 | |
| 10 | #ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS |
| 11 | int main(){ return 0; } |
| 12 | #else |
| 13 | |
| 14 | //[ is_reference_member |
| 15 | #include <type_traits> |
| 16 | #include <boost/callable_traits/is_reference_member.hpp> |
| 17 | |
| 18 | namespace ct = boost::callable_traits; |
| 19 | |
| 20 | static_assert(ct::is_reference_member<int()&>::value, ""); |
| 21 | static_assert(ct::is_reference_member<int()&&>::value, ""); |
| 22 | static_assert(!ct::is_reference_member<int()>::value, ""); |
| 23 | |
| 24 | struct foo; |
| 25 | |
| 26 | static_assert(ct::is_reference_member<int(foo::*)()&>::value, ""); |
| 27 | static_assert(ct::is_reference_member<int(foo::*)()&&>::value, ""); |
| 28 | static_assert(!ct::is_reference_member<int(foo::*)()>::value, ""); |
| 29 | |
| 30 | int main() {} |
| 31 | //] |
| 32 | #endif |
| 33 |
