]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/icl/test/test_type_lists.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / icl / test / test_type_lists.hpp
1 /*-----------------------------------------------------------------------------+
2 Copyright (c) 2008-2009: Joachim Faulhaber
3 +------------------------------------------------------------------------------+
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENCE.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7 +-----------------------------------------------------------------------------*/
8 #ifndef BOOST_ICL_TEST_TYPE_LISTS_HPP_JOFA_080916
9 #define BOOST_ICL_TEST_TYPE_LISTS_HPP_JOFA_080916
10
11 //#define BOOST_ICL_TEST_XINT
12 //#define BOOST_ICL_TEST_CHRONO
13
14 #include <boost/mpl/list.hpp>
15
16 // interval instance types
17 #include <boost/icl/gregorian.hpp>
18 #include <boost/icl/ptime.hpp>
19
20 #ifdef BOOST_ICL_TEST_XINT
21 # include <boost/icl/xint.hpp>
22 #endif
23
24 #ifdef BOOST_ICL_TEST_CHRONO
25 # define BOOST_CHRONO_EXTENSIONS
26 # include <libs/icl/test/chrono/utility.hpp>
27
28 namespace boch = boost::chrono;
29 #endif
30
31 #include <boost/icl/rational.hpp>
32
33
34 #if(_MSC_VER < 1500 && defined(_DEBUG) ) // 1500 = MSVC-9.0
35 typedef int boost_posix_time_ptime;
36 typedef int boost_posix_time_duration;
37 typedef int boost_gregorian_date;
38 typedef int boost_gregorian_date_duration;
39 #else
40 typedef boost::posix_time::ptime boost_posix_time_ptime;
41 typedef boost::posix_time::time_duration boost_posix_time_duration;
42 typedef boost::gregorian::date boost_gregorian_date;
43 typedef boost::gregorian::date_duration boost_gregorian_date_duration;
44 #endif
45
46 typedef ::boost::mpl::list<
47 unsigned short, unsigned int, unsigned long
48 ,short, int, long, long long
49 ,float, double, long double
50 ,boost::rational<int>
51 #ifdef BOOST_ICL_TEST_XINT
52 ,boost::xint::integer
53 ,boost::rational<boost::xint::integer>
54 #endif
55 #ifdef BOOST_ICL_TEST_CHRONO
56 ,boch::duration<int>
57 ,boch::duration<double>
58 ,Now::time_point
59 ,boch::time_point<Now, boch::duration<double> >
60 #endif
61 ,boost_posix_time_ptime
62 ,boost_posix_time_duration
63 ,boost_gregorian_date
64 ,boost_gregorian_date_duration
65 ,int*
66 > bicremental_types;
67
68 #ifdef BOOST_ICL_TEST_CHRONO
69 typedef boch::duration<long long, boost::ratio<1,113> > duration_long2_113s;
70 typedef boch::duration<int, boost::ratio<11,113> > duration_int_11_113s;
71 typedef boch::duration<boost::rational<int>, boost::ratio<101,997> > duration_rational_101_997s;
72 typedef boch::time_point<Now, duration_int_11_113s > Now_time_int_11_113s;
73 typedef boch::time_point<Now, boch::duration<double> > Now_time_double;
74 typedef boch::time_point<Now, boch::duration<boost::rational<int> > > Now_time_rational;
75 typedef boch::time_point<Now, duration_rational_101_997s > Now_time_rational_101_997s;
76
77 typedef boch::duration<int> bicremental_type_1;
78 typedef boch::duration<double> bicremental_type_2;
79 typedef Now::time_point bicremental_type_3;
80 typedef Now_time_double bicremental_type_4;
81 typedef Now_time_rational bicremental_type_5;
82 typedef duration_long2_113s bicremental_type_6;
83 typedef duration_rational_101_997s bicremental_type_7;
84 typedef Now_time_rational_101_997s bicremental_type_8;
85 #else
86 typedef unsigned int bicremental_type_1;
87 typedef int bicremental_type_2;
88 typedef double bicremental_type_3;
89 typedef boost::rational<int> bicremental_type_4;
90 typedef boost_posix_time_ptime bicremental_type_5;
91 typedef short bicremental_type_6;
92 typedef float bicremental_type_7;
93 typedef int* bicremental_type_8;
94 #endif //BOOST_ICL_TEST_CHRONO
95
96 typedef ::boost::mpl::list<
97 short, int, long, long long
98 ,float, double, long double
99 ,boost::rational<int>
100 #ifdef BOOST_ICL_TEST_XINT
101 ,boost::xint::integer
102 ,boost::rational<boost::xint::integer>
103 #endif
104 #ifdef BOOST_ICL_TEST_CHRONO
105 ,boch::duration<int>
106 ,boch::duration<float>
107 ,Now::time_point
108 #endif
109 > signed_bicremental_types;
110
111 #ifdef BOOST_ICL_TEST_CHRONO
112 typedef boch::duration<int> signed_bicremental_type_1;
113 typedef boch::duration<double> signed_bicremental_type_2;
114 typedef Now::time_point signed_bicremental_type_3;
115 typedef Now_time_double signed_bicremental_type_4;
116 typedef Now_time_rational signed_bicremental_type_5;
117 #else
118 typedef int signed_bicremental_type_1;
119 typedef double signed_bicremental_type_2;
120 typedef boost::rational<int> signed_bicremental_type_3;
121 typedef short signed_bicremental_type_4;
122 typedef float signed_bicremental_type_5;
123 #endif //BOOST_ICL_TEST_CHRONO
124
125 //DBG short list for debugging
126 typedef ::boost::mpl::list<
127 int
128 > debug_types;
129
130 typedef ::boost::mpl::list<
131 float, double, long double
132 ,boost::rational<int>
133 #ifdef BOOST_ICL_TEST_XINT
134 ,boost::rational<boost::xint::integer>
135 #endif
136 #ifdef BOOST_ICL_TEST_CHRONO
137 ,boch::duration<double>
138 ,boch::time_point<Now, boch::duration<double> >
139 #endif
140 > bicremental_continuous_types;
141
142
143 #ifdef BOOST_ICL_TEST_CHRONO
144 typedef boch::duration<double> bicremental_continuous_type_1;
145 typedef Now_time_double bicremental_continuous_type_2;
146 typedef Now_time_rational bicremental_continuous_type_3;
147 #else
148 typedef float bicremental_continuous_type_1;
149 typedef double bicremental_continuous_type_2;
150 typedef boost::rational<int> bicremental_continuous_type_3;
151 #endif // BOOST_ICL_TEST_CHRONO
152
153
154 typedef ::boost::mpl::list<
155 unsigned short, unsigned int
156 ,unsigned long, unsigned long long
157 ,short, int, long, long long
158 #ifdef BOOST_ICL_TEST_XINT
159 ,boost::xint::integer
160 #endif
161 > integral_types;
162
163 typedef int integral_type_1;
164 typedef unsigned int integral_type_2;
165 typedef short integral_type_3;
166 typedef unsigned int integral_type_4;
167
168 typedef ::boost::mpl::list<
169 unsigned short, unsigned int
170 ,unsigned long, unsigned long long
171 ,short, int, long
172 #ifdef BOOST_ICL_TEST_XINT
173 ,boost::xint::integer
174 #endif
175 #ifdef BOOST_ICL_TEST_CHRONO
176 ,boch::duration<unsigned short>
177 ,Now::time_point
178 #endif
179 ,boost_posix_time_ptime
180 ,boost_posix_time_duration
181 ,boost_gregorian_date
182 ,boost_gregorian_date_duration
183 ,int*
184 > discrete_types;
185
186
187 #ifdef BOOST_ICL_TEST_CHRONO
188 typedef boch::duration<int> discrete_type_1;
189 typedef duration_int_11_113s discrete_type_2;
190 typedef Now::time_point discrete_type_3;
191 typedef duration_long2_113s discrete_type_4;
192 typedef Now_time_int_11_113s discrete_type_5;
193 typedef short discrete_type_6;
194 typedef int* discrete_type_7;
195 typedef boost_posix_time_duration discrete_type_8;
196 #else
197 typedef int discrete_type_1;
198 typedef boost_posix_time_ptime discrete_type_2;
199 typedef unsigned int discrete_type_3;
200 typedef short discrete_type_4;
201 typedef int* discrete_type_5;
202 typedef boost_posix_time_duration discrete_type_6;
203 typedef boost_gregorian_date discrete_type_7;
204 typedef boost_gregorian_date_duration discrete_type_8;
205 #endif //BOOST_ICL_TEST_CHRONO
206
207 typedef ::boost::mpl::list<
208 short, int, long
209 > signed_discrete_types;
210
211 #ifdef BOOST_ICL_TEST_CHRONO
212 typedef Now::time_point signed_discrete_type_1;
213 typedef duration_long2_113s signed_discrete_type_2;
214 typedef Now_time_int_11_113s signed_discrete_type_3;
215 #else
216 typedef int signed_discrete_type_1;
217 typedef short signed_discrete_type_2;
218 typedef long signed_discrete_type_3;
219 #endif //BOOST_ICL_TEST_CHRONO
220
221 typedef ::boost::mpl::list<
222 float, double, long double
223 ,boost::rational<int>
224 #ifdef BOOST_ICL_TEST_XINT
225 ,boost::rational<boost::xint::integer>
226 #endif
227 //JODO
228 //test_interval_map_shared.hpp(1190) : error C2440: 'initializing' : cannot convert from 'long double' to 'boost::chrono::duration<Rep>'
229 //#ifdef BOOST_ICL_TEST_CHRONO
230 // ,boost::chrono::duration<long double>
231 //#endif
232 > numeric_continuous_types;
233
234
235 #ifdef BOOST_ICL_TEST_CHRONO
236 typedef boch::duration<double> numeric_continuous_type_1;
237 typedef Now_time_double numeric_continuous_type_2;
238 typedef Now_time_rational numeric_continuous_type_3;
239 typedef duration_rational_101_997s numeric_continuous_type_4;
240 #else
241 typedef double numeric_continuous_type_1;
242 typedef float numeric_continuous_type_2;
243 typedef boost::rational<int> numeric_continuous_type_3;
244 typedef long double numeric_continuous_type_4;
245 #endif //BOOST_ICL_TEST_CHRONO
246
247
248 typedef ::boost::mpl::list<
249 float, double, long double
250 ,boost::rational<int>
251 #ifdef BOOST_ICL_TEST_XINT
252 ,boost::rational<boost::xint::integer>
253 #endif
254 #ifdef BOOST_ICL_TEST_CHRONO
255 ,boch::duration<double>
256 ,boch::time_point<Now, boch::duration<double> >
257 #endif
258 ,std::string
259 > continuous_types;
260
261 #ifdef BOOST_ICL_TEST_CHRONO
262 typedef boch::duration<double> continuous_type_1;
263 typedef Now_time_double continuous_type_2;
264 typedef Now_time_rational continuous_type_3;
265 typedef std::string continuous_type_4;
266 #else
267 typedef double continuous_type_1;
268 typedef float continuous_type_2;
269 typedef boost::rational<int> continuous_type_3;
270 typedef std::string continuous_type_4;
271 #endif //BOOST_ICL_TEST_CHRONO
272
273 typedef ::boost::mpl::list<
274 unsigned short
275 ,unsigned long
276 ,unsigned long long
277 ,short
278 ,int
279 ,long
280 ,long long
281 ,float
282 ,double
283 ,long double
284 ,boost::rational<int>
285 #ifdef BOOST_ICL_TEST_XINT
286 ,boost::xint::integer
287 #endif
288 #ifdef BOOST_ICL_TEST_CHRONO
289 ,boch::duration<short>
290 ,boch::duration<long double>
291 ,Now::time_point
292 #endif
293 ,boost_posix_time_ptime
294 ,boost_posix_time_duration
295 ,boost_gregorian_date
296 ,boost_gregorian_date_duration
297 ,int*
298 ,std::string
299 > ordered_types;
300
301 #ifdef BOOST_ICL_TEST_CHRONO
302 typedef boch::duration<int> ordered_type_1;
303 typedef boch::duration<double> ordered_type_2;
304 typedef Now::time_point ordered_type_3;
305 typedef Now_time_double ordered_type_4;
306 typedef Now_time_rational ordered_type_5;
307 #else
308 typedef int ordered_type_1;
309 typedef std::string ordered_type_2;
310 typedef boost_posix_time_ptime ordered_type_3;
311 typedef boost::rational<int> ordered_type_4;
312 typedef double ordered_type_5;
313 #endif //BOOST_ICL_TEST_CHRONO
314
315 #endif
316