is_member_pointer.qbk 988 B

1234567891011121314151617181920212223242526272829303132333435
  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_pointer is_member_pointer]
  8. template <class T>
  9. struct is_member_pointer : public __tof {};
  10. __inherit If T is a (possibly cv-qualified) pointer to a member (either a function
  11. or a data member)
  12. then inherits from __true_type,
  13. otherwise inherits from __false_type.
  14. __std_ref 3.9.2 and 8.3.3.
  15. [all_compilers]
  16. __header ` #include <boost/type_traits/is_member_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
  17. __examples
  18. [:`is_member_pointer<int (MyClass::*)>` inherits from `__true_type`.]
  19. [:`is_member_pointer<int (MyClass::*)(char)>::type` is the type `__true_type`.]
  20. [:`is_member_pointer<int (MyClass::*)(void)const>::value` is an integral constant
  21. expression that evaluates to /true/.]
  22. [:`is_member_pointer<T>::value_type` is the type `bool`.]
  23. [endsect]