class_of.cpp 539 B

12345678910111213141516171819202122
  1. /*<-
  2. Copyright (c) 2016 Barrett Adair
  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)
  5. ->*/
  6. #include <boost/callable_traits/detail/config.hpp>
  7. //[ class_of
  8. #include <type_traits>
  9. #include <boost/callable_traits/class_of.hpp>
  10. namespace ct = boost::callable_traits;
  11. struct foo;
  12. static_assert(std::is_same<foo, ct::class_of_t<int(foo::*)()>>::value, "");
  13. static_assert(std::is_same<foo, ct::class_of_t<int foo::*>>::value, "");
  14. int main() {}
  15. //]