summaryrefslogtreecommitdiff
path: root/boost/type_traits/is_arithmetic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_traits/is_arithmetic.hpp')
-rw-r--r--boost/type_traits/is_arithmetic.hpp35
1 files changed, 3 insertions, 32 deletions
diff --git a/boost/type_traits/is_arithmetic.hpp b/boost/type_traits/is_arithmetic.hpp
index a1d8c46d5f..c23811ebea 100644
--- a/boost/type_traits/is_arithmetic.hpp
+++ b/boost/type_traits/is_arithmetic.hpp
@@ -9,43 +9,14 @@
#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
-#if !defined( __CODEGEARC__ )
#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_float.hpp>
-#include <boost/type_traits/detail/ice_or.hpp>
-#include <boost/config.hpp>
-#endif
-
-// should be the last #include
-#include <boost/type_traits/detail/bool_trait_def.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
namespace boost {
-#if !defined(__CODEGEARC__)
-namespace detail {
-
-template< typename T >
-struct is_arithmetic_impl
-{
- BOOST_STATIC_CONSTANT(bool, value =
- (::boost::type_traits::ice_or<
- ::boost::is_integral<T>::value,
- ::boost::is_float<T>::value
- >::value));
-};
-
-} // namespace detail
-#endif
-
-//* is a type T an arithmetic type described in the standard (3.9.1p8)
-#if defined(__CODEGEARC__)
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T))
-#else
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl<T>::value)
-#endif
+template <class T>
+struct is_arithmetic : public integral_constant<bool, is_integral<T>::value || is_floating_point<T>::value> {};
} // namespace boost
-#include <boost/type_traits/detail/bool_trait_undef.hpp>
-
#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED