Chris@16
|
1 // Boost integer_fwd.hpp header file ---------------------------------------//
|
Chris@16
|
2
|
Chris@16
|
3 // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
|
Chris@16
|
4 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6
|
Chris@16
|
7 // See http://www.boost.org/libs/integer for documentation.
|
Chris@16
|
8
|
Chris@16
|
9 #ifndef BOOST_INTEGER_FWD_HPP
|
Chris@16
|
10 #define BOOST_INTEGER_FWD_HPP
|
Chris@16
|
11
|
Chris@16
|
12 #include <climits> // for UCHAR_MAX, etc.
|
Chris@16
|
13 #include <cstddef> // for std::size_t
|
Chris@16
|
14
|
Chris@16
|
15 #include <boost/config.hpp> // for BOOST_NO_INTRINSIC_WCHAR_T
|
Chris@16
|
16 #include <boost/limits.hpp> // for std::numeric_limits
|
Chris@16
|
17 #include <boost/cstdint.hpp> // For intmax_t
|
Chris@16
|
18
|
Chris@16
|
19
|
Chris@16
|
20 namespace boost
|
Chris@16
|
21 {
|
Chris@16
|
22
|
Chris@16
|
23 #ifdef BOOST_NO_INTEGRAL_INT64_T
|
Chris@16
|
24 typedef unsigned long static_log2_argument_type;
|
Chris@16
|
25 typedef int static_log2_result_type;
|
Chris@16
|
26 typedef long static_min_max_signed_type;
|
Chris@16
|
27 typedef unsigned long static_min_max_unsigned_type;
|
Chris@16
|
28 #else
|
Chris@16
|
29 typedef boost::uintmax_t static_min_max_unsigned_type;
|
Chris@16
|
30 typedef boost::intmax_t static_min_max_signed_type;
|
Chris@16
|
31 typedef boost::uintmax_t static_log2_argument_type;
|
Chris@16
|
32 typedef int static_log2_result_type;
|
Chris@16
|
33 #endif
|
Chris@16
|
34
|
Chris@16
|
35 // From <boost/cstdint.hpp> ------------------------------------------------//
|
Chris@16
|
36
|
Chris@16
|
37 // Only has typedefs or using statements, with #conditionals
|
Chris@16
|
38
|
Chris@16
|
39
|
Chris@16
|
40 // From <boost/integer_traits.hpp> -----------------------------------------//
|
Chris@16
|
41
|
Chris@16
|
42 template < class T >
|
Chris@16
|
43 class integer_traits;
|
Chris@16
|
44
|
Chris@16
|
45 template < >
|
Chris@16
|
46 class integer_traits< bool >;
|
Chris@16
|
47
|
Chris@16
|
48 template < >
|
Chris@16
|
49 class integer_traits< char >;
|
Chris@16
|
50
|
Chris@16
|
51 template < >
|
Chris@16
|
52 class integer_traits< signed char >;
|
Chris@16
|
53
|
Chris@16
|
54 template < >
|
Chris@16
|
55 class integer_traits< unsigned char >;
|
Chris@16
|
56
|
Chris@16
|
57 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
Chris@16
|
58 template < >
|
Chris@16
|
59 class integer_traits< wchar_t >;
|
Chris@16
|
60 #endif
|
Chris@16
|
61
|
Chris@16
|
62 template < >
|
Chris@16
|
63 class integer_traits< short >;
|
Chris@16
|
64
|
Chris@16
|
65 template < >
|
Chris@16
|
66 class integer_traits< unsigned short >;
|
Chris@16
|
67
|
Chris@16
|
68 template < >
|
Chris@16
|
69 class integer_traits< int >;
|
Chris@16
|
70
|
Chris@16
|
71 template < >
|
Chris@16
|
72 class integer_traits< unsigned int >;
|
Chris@16
|
73
|
Chris@16
|
74 template < >
|
Chris@16
|
75 class integer_traits< long >;
|
Chris@16
|
76
|
Chris@16
|
77 template < >
|
Chris@16
|
78 class integer_traits< unsigned long >;
|
Chris@16
|
79
|
Chris@16
|
80 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
Chris@16
|
81 template < >
|
Chris@16
|
82 class integer_traits< ::boost::long_long_type>;
|
Chris@16
|
83
|
Chris@16
|
84 template < >
|
Chris@16
|
85 class integer_traits< ::boost::ulong_long_type >;
|
Chris@16
|
86 #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
|
Chris@16
|
87 template < >
|
Chris@16
|
88 class integer_traits<__int64>;
|
Chris@16
|
89
|
Chris@16
|
90 template < >
|
Chris@16
|
91 class integer_traits<unsigned __int64>;
|
Chris@16
|
92 #endif
|
Chris@16
|
93
|
Chris@16
|
94
|
Chris@16
|
95 // From <boost/integer.hpp> ------------------------------------------------//
|
Chris@16
|
96
|
Chris@16
|
97 template < typename LeastInt >
|
Chris@16
|
98 struct int_fast_t;
|
Chris@16
|
99
|
Chris@16
|
100 template< int Bits >
|
Chris@16
|
101 struct int_t;
|
Chris@16
|
102
|
Chris@16
|
103 template< int Bits >
|
Chris@16
|
104 struct uint_t;
|
Chris@16
|
105
|
Chris@16
|
106 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
Chris@16
|
107 template< boost::long_long_type MaxValue > // maximum value to require support
|
Chris@16
|
108 #else
|
Chris@16
|
109 template< long MaxValue > // maximum value to require support
|
Chris@16
|
110 #endif
|
Chris@16
|
111 struct int_max_value_t;
|
Chris@16
|
112
|
Chris@16
|
113 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
Chris@16
|
114 template< boost::long_long_type MinValue > // minimum value to require support
|
Chris@16
|
115 #else
|
Chris@16
|
116 template< long MinValue > // minimum value to require support
|
Chris@16
|
117 #endif
|
Chris@16
|
118 struct int_min_value_t;
|
Chris@16
|
119
|
Chris@16
|
120 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
Chris@16
|
121 template< boost::ulong_long_type MaxValue > // maximum value to require support
|
Chris@16
|
122 #else
|
Chris@16
|
123 template< unsigned long MaxValue > // maximum value to require support
|
Chris@16
|
124 #endif
|
Chris@16
|
125 struct uint_value_t;
|
Chris@16
|
126
|
Chris@16
|
127
|
Chris@16
|
128 // From <boost/integer/integer_mask.hpp> -----------------------------------//
|
Chris@16
|
129
|
Chris@16
|
130 template < std::size_t Bit >
|
Chris@16
|
131 struct high_bit_mask_t;
|
Chris@16
|
132
|
Chris@16
|
133 template < std::size_t Bits >
|
Chris@16
|
134 struct low_bits_mask_t;
|
Chris@16
|
135
|
Chris@16
|
136 template < >
|
Chris@16
|
137 struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
|
Chris@16
|
138
|
Chris@16
|
139 // From <boost/integer/static_log2.hpp> ------------------------------------//
|
Chris@16
|
140
|
Chris@16
|
141 template <static_log2_argument_type Value >
|
Chris@16
|
142 struct static_log2;
|
Chris@16
|
143
|
Chris@16
|
144 template <> struct static_log2<0u>;
|
Chris@16
|
145
|
Chris@16
|
146
|
Chris@16
|
147 // From <boost/integer/static_min_max.hpp> ---------------------------------//
|
Chris@16
|
148
|
Chris@16
|
149 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
|
Chris@16
|
150 struct static_signed_min;
|
Chris@16
|
151
|
Chris@16
|
152 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
|
Chris@16
|
153 struct static_signed_max;
|
Chris@16
|
154
|
Chris@16
|
155 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
|
Chris@16
|
156 struct static_unsigned_min;
|
Chris@16
|
157
|
Chris@16
|
158 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
|
Chris@16
|
159 struct static_unsigned_max;
|
Chris@16
|
160
|
Chris@101
|
161
|
Chris@101
|
162 // From <boost/integer/common_factor_ct.hpp>
|
Chris@101
|
163
|
Chris@101
|
164 #ifdef BOOST_NO_INTEGRAL_INT64_T
|
Chris@101
|
165 typedef unsigned long static_gcd_type;
|
Chris@101
|
166 #else
|
Chris@101
|
167 typedef boost::uintmax_t static_gcd_type;
|
Chris@101
|
168 #endif
|
Chris@101
|
169
|
Chris@101
|
170 template < static_gcd_type Value1, static_gcd_type Value2 >
|
Chris@101
|
171 struct static_gcd;
|
Chris@101
|
172 template < static_gcd_type Value1, static_gcd_type Value2 >
|
Chris@101
|
173 struct static_lcm;
|
Chris@101
|
174
|
Chris@101
|
175
|
Chris@101
|
176 // From <boost/integer/common_factor_rt.hpp>
|
Chris@101
|
177
|
Chris@101
|
178 template < typename IntegerType >
|
Chris@101
|
179 class gcd_evaluator;
|
Chris@101
|
180 template < typename IntegerType >
|
Chris@101
|
181 class lcm_evaluator;
|
Chris@101
|
182
|
Chris@101
|
183
|
Chris@16
|
184 } // namespace boost
|
Chris@16
|
185
|
Chris@16
|
186
|
Chris@16
|
187 #endif // BOOST_INTEGER_FWD_HPP
|