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).
8 [section:is_scalar is_scalar]
10 struct is_scalar : public __tof {};
12 __inherit If T is a (possibly cv-qualified) scalar type then inherits from
13 __true_type, otherwise inherits from __false_type. Scalar types include
14 integral, floating point, enumeration, pointer, and pointer-to-member types.
18 __header ` #include <boost/type_traits/is_scalar.hpp>` or ` #include <boost/type_traits.hpp>`
24 [:`is_scalar<int*>` inherits from `__true_type`.]
26 [:`is_scalar<int>::type` is the type `__true_type`.]
28 [:`is_scalar<double>::value` is an integral constant
29 expression that evaluates to /true/.]
31 [:`is_scalar<int (*)(long)>::value` is an integral constant
32 expression that evaluates to /true/.]
34 [:`is_scalar<int (MyClass::*)(long)>::value` is an integral constant
35 expression that evaluates to /true/.]
37 [:`is_scalar<int (MyClass::*)>::value` is an integral constant
38 expression that evaluates to /true/.]
40 [:`is_scalar<T>::value_type` is the type `bool`.]