blob: 72e13d372ca5b725a9dec241c759f7bff60482f3 [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_INTEGRAL_HPP_INCLUDED
10#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
11
Jeff Thompson2277ce52013-08-01 17:34:11 -070012#include <ndnboost/config.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070013
14// should be the last #include
Jeff Thompson2277ce52013-08-01 17:34:11 -070015#include <ndnboost/type_traits/detail/bool_trait_def.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070016
17namespace ndnboost {
18
19//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
20// as an extension we include long long, as this is likely to be added to the
21// standard at a later date
22#if defined( __CODEGEARC__ )
23BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T))
24#else
25BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false)
26
27BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true)
28BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true)
29BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true)
30BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true)
31
32BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true)
33BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true)
34BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true)
35BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true)
36
37BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true)
38BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true)
39
40#ifndef BOOST_NO_INTRINSIC_WCHAR_T
41// If the following line fails to compile and you're using the Intel
42// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php,
43// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line.
44BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
45#endif
46
47// Same set of integral types as in boost/type_traits/integral_promotion.hpp.
48// Please, keep in sync. -- Alexander Nasonov
49#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \
50 || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
51 || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300))
52BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true)
53BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true)
54BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true)
55BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true)
56BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true)
57BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true)
58#ifdef __BORLANDC__
59BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
60BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
61#endif
62#endif
63
64# if defined(BOOST_HAS_LONG_LONG)
65BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::ndnboost::ulong_long_type,true)
66BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::ndnboost::long_long_type,true)
67#elif defined(BOOST_HAS_MS_INT64)
68BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
69BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
70#endif
71
72#ifdef BOOST_HAS_INT128
73BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,ndnboost::int128_type,true)
74BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,ndnboost::uint128_type,true)
75#endif
76
77#endif // non-CodeGear implementation
78
79} // namespace ndnboost
80
Jeff Thompson2277ce52013-08-01 17:34:11 -070081#include <ndnboost/type_traits/detail/bool_trait_undef.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070082
83#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED