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