• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
main()10 int main(){ return 0; }
11 #else
12 
13 //[ qualified_class_of
14 #include <type_traits>
15 #include <boost/callable_traits/qualified_class_of.hpp>
16 
17 namespace ct = boost::callable_traits;
18 
19 struct foo;
20 
21 static_assert(std::is_same<foo &,
22     ct::qualified_class_of_t<int(foo::*)()>>::value, "");
23 
24 static_assert(std::is_same<foo const &,
25     ct::qualified_class_of_t<int(foo::*)() const>>::value, "");
26 
27 static_assert(std::is_same<foo volatile &&,
28     ct::qualified_class_of_t<int(foo::*)() volatile &&>>::value, "");
29 
main()30 int main() {}
31 //]
32 #endif
33