is_fundamental.hpp 994 B

1234567891011121314151617181920212223242526
  1. // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. //
  6. // See http://www.boost.org/libs/type_traits for most recent version including documentation.
  7. #ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
  8. #define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
  9. #include <boost/type_traits/is_arithmetic.hpp>
  10. #include <boost/type_traits/is_void.hpp>
  11. namespace boost {
  12. //* is a type T a fundamental type described in the standard (3.9.1)
  13. #if defined( __CODEGEARC__ )
  14. template <class T> struct is_fundamental : public integral_constant<bool, __is_fundamental(T)> {};
  15. #else
  16. template <class T> struct is_fundamental : public integral_constant<bool, ::boost::is_arithmetic<T>::value || ::boost::is_void<T>::value> {};
  17. #endif
  18. } // namespace boost
  19. #endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED