is_member_function_pointer.qbk 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. [/
  2. Copyright 2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:is_member_function_pointer is_member_function_pointer]
  8. template <class T>
  9. struct is_member_function_pointer : public __tof {};
  10. __inherit If T is a (possibly cv-qualified) pointer to a member function
  11. then inherits from __true_type,
  12. otherwise inherits from __false_type.
  13. __std_ref 3.9.2 and 8.3.3.
  14. [all_compilers]
  15. __header ` #include <boost/type_traits/is_member_function_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
  16. __examples
  17. [:`is_member_function_pointer<int (MyClass::*)(void)>` inherits from `__true_type`.]
  18. [:`is_member_function_pointer<int (MyClass::*)(char)>::type` is the type `__true_type`.]
  19. [:`is_member_function_pointer<int (MyClass::*)(void)const>::value` is an integral constant
  20. expression that evaluates to /true/.]
  21. [:`is_member_function_pointer<int (MyClass::*)>::value` is an integral constant
  22. expression that evaluates to /false/: the argument in this case is a pointer to
  23. a data member and not a member function, see __is_member_object_pointer
  24. and __is_member_pointer]
  25. [:`is_member_function_pointer<T>::value_type` is the type `bool`.]
  26. [endsect]