blob: 9878ca99d9669725c4c9ce71df97efaf193916d2 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001
2// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6//
7// See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
9#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
10#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
11
12#if !defined( __CODEGEARC__ )
Jeff Thompson2277ce52013-08-01 17:34:11 -070013#include <ndnboost/type_traits/is_integral.hpp>
14#include <ndnboost/type_traits/is_float.hpp>
15#include <ndnboost/type_traits/detail/ice_or.hpp>
16#include <ndnboost/config.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070017#endif
18
19// should be the last #include
Jeff Thompson2277ce52013-08-01 17:34:11 -070020#include <ndnboost/type_traits/detail/bool_trait_def.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070021
22namespace ndnboost {
23
24#if !defined(__CODEGEARC__)
25namespace detail {
26
27template< typename T >
28struct is_arithmetic_impl
29{
30 BOOST_STATIC_CONSTANT(bool, value =
31 (::ndnboost::type_traits::ice_or<
32 ::ndnboost::is_integral<T>::value,
33 ::ndnboost::is_float<T>::value
34 >::value));
35};
36
37} // namespace detail
38#endif
39
40//* is a type T an arithmetic type described in the standard (3.9.1p8)
41#if defined(__CODEGEARC__)
42BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T))
43#else
44BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::ndnboost::detail::is_arithmetic_impl<T>::value)
45#endif
46
47} // namespace ndnboost
48
Jeff Thompson2277ce52013-08-01 17:34:11 -070049#include <ndnboost/type_traits/detail/bool_trait_undef.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070050
51#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED