has_member_qualifiers.cpp 584 B

123456789101112131415161718192021
  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. //[ has_member_qualifiers
  7. #include <type_traits>
  8. #include <boost/callable_traits/has_member_qualifiers.hpp>
  9. namespace ct = boost::callable_traits;
  10. struct foo;
  11. static_assert(ct::has_member_qualifiers<int(foo::*)() const>::value, "");
  12. static_assert(ct::has_member_qualifiers<int(foo::*)() volatile>::value, "");
  13. static_assert(!ct::has_member_qualifiers<int(foo::*)()>::value, "");
  14. int main() {}
  15. //]