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).
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
9 #ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
10 #define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
12 #include "boost/config.hpp"
14 // should be the last #include
15 #include "boost/type_traits/detail/bool_trait_def.hpp"
19 //* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
20 // as an extention we include long long, as this is likely to be added to the
21 // standard at a later date
22 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false)
24 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true)
25 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true)
26 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true)
27 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true)
29 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true)
30 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true)
31 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true)
32 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true)
34 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true)
35 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true)
37 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
38 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
41 #if (defined(BOOST_MSVC) && (BOOST_MSVC == 1200)) \
42 || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
43 || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER == 1200))
44 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true)
45 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true)
46 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true)
47 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true)
48 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true)
49 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true)
51 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
52 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
56 # if defined(BOOST_HAS_LONG_LONG)
57 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long long,true)
58 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,long long,true)
59 #elif defined(BOOST_HAS_MS_INT64)
60 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
61 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
66 #include "boost/type_traits/detail/bool_trait_undef.hpp"
68 #endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED