is_arithmetic.qbk 948 B

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