source: NonGTP/Boost/boost/type_traits/is_integral.hpp @ 857

Revision 857, 3.0 KB checked in by igarcia, 18 years ago (diff)
Line 
1
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
12#include "boost/config.hpp"
13
14// should be the last #include
15#include "boost/type_traits/detail/bool_trait_def.hpp"
16
17namespace boost {
18
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
22BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false)
23
24BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true)
25BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true)
26BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true)
27BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true)
28
29BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true)
30BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true)
31BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true)
32BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true)
33
34BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true)
35BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true)
36
37#ifndef BOOST_NO_INTRINSIC_WCHAR_T
38// If the following line fails to compile and you're using the Intel
39// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php,
40// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line.
41BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
42#endif
43
44#if (defined(BOOST_MSVC) && (BOOST_MSVC == 1200)) \
45    || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
46    || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER == 1200))
47BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true)
48BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true)
49BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true)
50BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true)
51BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true)
52BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true)
53#ifdef __BORLANDC__
54BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
55BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
56#endif
57#endif
58
59# if defined(BOOST_HAS_LONG_LONG)
60BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::ulong_long_type,true)
61BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::long_long_type,true)
62#elif defined(BOOST_HAS_MS_INT64)
63BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
64BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
65#endif
66
67} // namespace boost
68
69#include "boost/type_traits/detail/bool_trait_undef.hpp"
70
71#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.