2 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3 // Permission to copy, use, modify, sell and
4 // distribute this software is granted provided this copyright notice appears
5 // in all copies. This software is provided "as is" without express or implied
6 // warranty, and with no claim as to its suitability for any purpose.
8 // See http://www.boost.org for most recent version including documentation.
10 #ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED
11 #define BOOST_TT_IS_SCALAR_HPP_INCLUDED
13 #include "boost/type_traits/is_arithmetic.hpp"
14 #include "boost/type_traits/is_enum.hpp"
15 #include "boost/type_traits/is_pointer.hpp"
16 #include "boost/type_traits/is_member_pointer.hpp"
17 #include "boost/type_traits/detail/ice_or.hpp"
18 #include "boost/config.hpp"
20 // should be the last #include
21 #include "boost/type_traits/detail/bool_trait_def.hpp"
30 BOOST_STATIC_CONSTANT(bool, value =
31 (::boost::type_traits::ice_or<
32 ::boost::is_arithmetic<T>::value,
33 ::boost::is_enum<T>::value,
34 ::boost::is_pointer<T>::value,
35 ::boost::is_member_pointer<T>::value
39 // these specializations are only really needed for compilers
40 // without partial specialization support:
41 template <> struct is_scalar_impl<void>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
42 #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
43 template <> struct is_scalar_impl<void const>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
44 template <> struct is_scalar_impl<void volatile>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
45 template <> struct is_scalar_impl<void const volatile>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
50 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl<T>::value)
54 #include "boost/type_traits/detail/bool_trait_undef.hpp"
56 #endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED