]>
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_integral is_integral] | |
9 | template <class T> | |
10 | struct is_integral : public __tof {}; | |
11 | ||
12 | __inherit If T is a (possibly cv-qualified) integral type then inherits from __true_type, | |
13 | otherwise inherits from __false_type. | |
14 | ||
15 | __std_ref 3.9.1p7. | |
16 | ||
17 | [all_compilers] | |
18 | ||
19 | __header ` #include <boost/type_traits/is_integral.hpp>` or ` #include <boost/type_traits.hpp>` | |
20 | ||
21 | __examples | |
22 | ||
23 | [:`is_integral<int>` inherits from `__true_type`.] | |
24 | ||
25 | [:`is_integral<const char>::type` is the type `__true_type`.] | |
26 | ||
27 | [:`is_integral<long>::value` is an integral constant | |
28 | expression that evaluates to /true/.] | |
29 | ||
30 | [:`is_integral<T>::value_type` is the type `bool`.] | |
31 | ||
32 | [endsect] | |
33 |