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