File indexing completed on 2025-01-18 09:53:11
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
0010 #define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
0011
0012 #include <boost/config.hpp>
0013 #include <boost/type_traits/integral_constant.hpp>
0014
0015 namespace boost {
0016
0017 #if defined( BOOST_CODEGEARC )
0018 template <class T>
0019 struct is_integral : public integral_constant<bool, __is_integral(T)> {};
0020 #else
0021
0022 template <class T> struct is_integral : public false_type {};
0023 template <class T> struct is_integral<const T> : public is_integral<T> {};
0024 template <class T> struct is_integral<volatile const T> : public is_integral<T>{};
0025 template <class T> struct is_integral<volatile T> : public is_integral<T>{};
0026
0027
0028
0029
0030 template<> struct is_integral<unsigned char> : public true_type {};
0031 template<> struct is_integral<unsigned short> : public true_type{};
0032 template<> struct is_integral<unsigned int> : public true_type{};
0033 template<> struct is_integral<unsigned long> : public true_type{};
0034
0035 template<> struct is_integral<signed char> : public true_type{};
0036 template<> struct is_integral<short> : public true_type{};
0037 template<> struct is_integral<int> : public true_type{};
0038 template<> struct is_integral<long> : public true_type{};
0039
0040 template<> struct is_integral<char> : public true_type{};
0041 template<> struct is_integral<bool> : public true_type{};
0042
0043 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
0044
0045
0046
0047 template<> struct is_integral<wchar_t> : public true_type{};
0048 #endif
0049
0050
0051
0052 #if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
0053 || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x600) && (_MSC_VER < 1300))
0054 template<> struct is_integral<unsigned __int8> : public true_type{};
0055 template<> struct is_integral<unsigned __int16> : public true_type{};
0056 template<> struct is_integral<unsigned __int32> : public true_type{};
0057 template<> struct is_integral<__int8> : public true_type{};
0058 template<> struct is_integral<__int16> : public true_type{};
0059 template<> struct is_integral<__int32> : public true_type{};
0060 #ifdef BOOST_BORLANDC
0061 template<> struct is_integral<unsigned __int64> : public true_type{};
0062 template<> struct is_integral<__int64> : public true_type{};
0063 #endif
0064 #endif
0065
0066 # if defined(BOOST_HAS_LONG_LONG)
0067 template<> struct is_integral< ::boost::ulong_long_type> : public true_type{};
0068 template<> struct is_integral< ::boost::long_long_type> : public true_type{};
0069 #elif defined(BOOST_HAS_MS_INT64)
0070 template<> struct is_integral<unsigned __int64> : public true_type{};
0071 template<> struct is_integral<__int64> : public true_type{};
0072 #endif
0073
0074 #ifdef BOOST_HAS_INT128
0075 template<> struct is_integral<boost::int128_type> : public true_type{};
0076 template<> struct is_integral<boost::uint128_type> : public true_type{};
0077 #endif
0078 #ifndef BOOST_NO_CXX11_CHAR16_T
0079 template<> struct is_integral<char16_t> : public true_type{};
0080 #endif
0081 #ifndef BOOST_NO_CXX11_CHAR32_T
0082 template<> struct is_integral<char32_t> : public true_type{};
0083 #endif
0084 #if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
0085 template<> struct is_integral<char8_t> : public true_type{};
0086 #endif
0087
0088 #endif
0089
0090 }
0091
0092 #endif