1 // Boost integer_fwd.hpp header file ---------------------------------------//
\r
3 // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
\r
4 // Software License, Version 1.0. (See accompanying file
\r
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
7 // See http://www.boost.org/libs/integer for documentation.
\r
9 #ifndef BOOST_INTEGER_FWD_HPP
\r
10 #define BOOST_INTEGER_FWD_HPP
\r
12 #include <climits> // for UCHAR_MAX, etc.
\r
13 #include <cstddef> // for std::size_t
\r
15 #include <boost/config.hpp> // for BOOST_NO_INTRINSIC_WCHAR_T
\r
16 #include <boost/limits.hpp> // for std::numeric_limits
\r
17 #include <boost/cstdint.hpp> // For intmax_t
\r
23 #ifdef BOOST_NO_INTEGRAL_INT64_T
\r
24 typedef unsigned long static_log2_argument_type;
\r
25 typedef int static_log2_result_type;
\r
26 typedef long static_min_max_signed_type;
\r
27 typedef unsigned long static_min_max_unsigned_type;
\r
29 typedef boost::uintmax_t static_min_max_unsigned_type;
\r
30 typedef boost::intmax_t static_min_max_signed_type;
\r
31 typedef boost::uintmax_t static_log2_argument_type;
\r
32 typedef int static_log2_result_type;
\r
35 // From <boost/cstdint.hpp> ------------------------------------------------//
\r
37 // Only has typedefs or using statements, with #conditionals
\r
40 // From <boost/integer_traits.hpp> -----------------------------------------//
\r
42 template < class T >
\r
43 class integer_traits;
\r
46 class integer_traits< bool >;
\r
49 class integer_traits< char >;
\r
52 class integer_traits< signed char >;
\r
55 class integer_traits< unsigned char >;
\r
57 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
\r
59 class integer_traits< wchar_t >;
\r
63 class integer_traits< short >;
\r
66 class integer_traits< unsigned short >;
\r
69 class integer_traits< int >;
\r
72 class integer_traits< unsigned int >;
\r
75 class integer_traits< long >;
\r
78 class integer_traits< unsigned long >;
\r
80 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64))
\r
82 class integer_traits< ::boost::long_long_type>;
\r
85 class integer_traits< ::boost::ulong_long_type >;
\r
89 // From <boost/integer.hpp> ------------------------------------------------//
\r
91 template < typename LeastInt >
\r
94 template< int Bits >
\r
97 template< int Bits >
\r
100 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
\r
101 template< boost::long_long_type MaxValue > // maximum value to require support
\r
103 template< long MaxValue > // maximum value to require support
\r
105 struct int_max_value_t;
\r
107 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
\r
108 template< boost::long_long_type MinValue > // minimum value to require support
\r
110 template< long MinValue > // minimum value to require support
\r
112 struct int_min_value_t;
\r
114 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
\r
115 template< boost::ulong_long_type MaxValue > // maximum value to require support
\r
117 template< unsigned long MaxValue > // maximum value to require support
\r
119 struct uint_value_t;
\r
122 // From <boost/integer/integer_mask.hpp> -----------------------------------//
\r
124 template < std::size_t Bit >
\r
125 struct high_bit_mask_t;
\r
127 template < std::size_t Bits >
\r
128 struct low_bits_mask_t;
\r
131 struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
\r
133 #if USHRT_MAX > UCHAR_MAX
\r
135 struct low_bits_mask_t< ::std::numeric_limits<unsigned short>::digits >;
\r
138 #if UINT_MAX > USHRT_MAX
\r
140 struct low_bits_mask_t< ::std::numeric_limits<unsigned int>::digits >;
\r
143 #if ULONG_MAX > UINT_MAX
\r
145 struct low_bits_mask_t< ::std::numeric_limits<unsigned long>::digits >;
\r
149 // From <boost/integer/static_log2.hpp> ------------------------------------//
\r
151 template <static_log2_argument_type Value >
\r
152 struct static_log2;
\r
154 template <> struct static_log2<0u>;
\r
157 // From <boost/integer/static_min_max.hpp> ---------------------------------//
\r
159 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
\r
160 struct static_signed_min;
\r
162 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
\r
163 struct static_signed_max;
\r
165 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
\r
166 struct static_unsigned_min;
\r
168 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
\r
169 struct static_unsigned_max;
\r
171 } // namespace boost
\r
174 #endif // BOOST_INTEGER_FWD_HPP
\r