1 // Boost integer_fwd.hpp header file ---------------------------------------//
3 // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/integer for documentation.
9 #ifndef BOOST_INTEGER_FWD_HPP
10 #define BOOST_INTEGER_FWD_HPP
12 #include <climits> // for UCHAR_MAX, etc.
13 #include <cstddef> // for std::size_t
15 #include <boost/config.hpp> // for BOOST_NO_INTRINSIC_WCHAR_T
16 #include <boost/limits.hpp> // for std::numeric_limits
17 #include <boost/cstdint.hpp> // For intmax_t
23 #ifdef BOOST_NO_INTEGRAL_INT64_T
24 typedef unsigned long static_log2_argument_type;
25 typedef int static_log2_result_type;
26 typedef long static_min_max_signed_type;
27 typedef unsigned long static_min_max_unsigned_type;
29 typedef boost::uintmax_t static_min_max_unsigned_type;
30 typedef boost::intmax_t static_min_max_signed_type;
31 typedef boost::uintmax_t static_log2_argument_type;
32 typedef int static_log2_result_type;
35 // From <boost/cstdint.hpp> ------------------------------------------------//
37 // Only has typedefs or using statements, with #conditionals
40 // From <boost/integer_traits.hpp> -----------------------------------------//
46 class integer_traits< bool >;
49 class integer_traits< char >;
52 class integer_traits< signed char >;
55 class integer_traits< unsigned char >;
57 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
59 class integer_traits< wchar_t >;
63 class integer_traits< short >;
66 class integer_traits< unsigned short >;
69 class integer_traits< int >;
72 class integer_traits< unsigned int >;
75 class integer_traits< long >;
78 class integer_traits< unsigned long >;
80 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
82 class integer_traits< ::boost::long_long_type>;
85 class integer_traits< ::boost::ulong_long_type >;
86 #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
88 class integer_traits<__int64>;
91 class integer_traits<unsigned __int64>;
95 // From <boost/integer.hpp> ------------------------------------------------//
97 template < typename LeastInt >
106 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
107 template< boost::long_long_type MaxValue > // maximum value to require support
109 template< long MaxValue > // maximum value to require support
111 struct int_max_value_t;
113 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
114 template< boost::long_long_type MinValue > // minimum value to require support
116 template< long MinValue > // minimum value to require support
118 struct int_min_value_t;
120 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
121 template< boost::ulong_long_type MaxValue > // maximum value to require support
123 template< unsigned long MaxValue > // maximum value to require support
128 // From <boost/integer/integer_mask.hpp> -----------------------------------//
130 template < std::size_t Bit >
131 struct high_bit_mask_t;
133 template < std::size_t Bits >
134 struct low_bits_mask_t;
137 struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
139 // From <boost/integer/static_log2.hpp> ------------------------------------//
141 template <static_log2_argument_type Value >
144 template <> struct static_log2<0u>;
147 // From <boost/integer/static_min_max.hpp> ---------------------------------//
149 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
150 struct static_signed_min;
152 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
153 struct static_signed_max;
155 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
156 struct static_unsigned_min;
158 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
159 struct static_unsigned_max;
162 // From <boost/integer/common_factor_ct.hpp>
164 #ifdef BOOST_NO_INTEGRAL_INT64_T
165 typedef unsigned long static_gcd_type;
167 typedef boost::uintmax_t static_gcd_type;
170 template < static_gcd_type Value1, static_gcd_type Value2 >
172 template < static_gcd_type Value1, static_gcd_type Value2 >
176 // From <boost/integer/common_factor_rt.hpp>
178 template < typename IntegerType >
180 template < typename IntegerType >
187 #endif // BOOST_INTEGER_FWD_HPP