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
11 //#define BOOST_ICL_TEST_XINT
12 //#define BOOST_ICL_TEST_CHRONO
14 #include <boost/mpl/list.hpp>
16 // interval instance types
17 #include <boost/icl/gregorian.hpp>
18 #include <boost/icl/ptime.hpp>
20 #ifdef BOOST_ICL_TEST_XINT
21 # include <boost/icl/xint.hpp>
24 #ifdef BOOST_ICL_TEST_CHRONO
25 # define BOOST_CHRONO_EXTENSIONS
26 # include <libs/icl/test/chrono/utility.hpp>
28 namespace boch = boost::chrono;
31 #include <boost/icl/rational.hpp>
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;
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;
46 typedef ::boost::mpl::list<
47 unsigned short, unsigned int, unsigned long
48 ,short, int, long, long long
49 ,float, double, long double
51 #ifdef BOOST_ICL_TEST_XINT
53 ,boost::rational<boost::xint::integer>
55 #ifdef BOOST_ICL_TEST_CHRONO
57 ,boch::duration<double>
59 ,boch::time_point<Now, boch::duration<double> >
61 ,boost_posix_time_ptime
62 ,boost_posix_time_duration
64 ,boost_gregorian_date_duration
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;
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;
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
96 typedef ::boost::mpl::list<
97 short, int, long, long long
98 ,float, double, long double
100 #ifdef BOOST_ICL_TEST_XINT
101 ,boost::xint::integer
102 ,boost::rational<boost::xint::integer>
104 #ifdef BOOST_ICL_TEST_CHRONO
106 ,boch::duration<float>
109 > signed_bicremental_types;
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;
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
125 //DBG short list for debugging
126 typedef ::boost::mpl::list<
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>
136 #ifdef BOOST_ICL_TEST_CHRONO
137 ,boch::duration<double>
138 ,boch::time_point<Now, boch::duration<double> >
140 > bicremental_continuous_types;
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;
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
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
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;
168 typedef ::boost::mpl::list<
169 unsigned short, unsigned int
170 ,unsigned long, unsigned long long
172 #ifdef BOOST_ICL_TEST_XINT
173 ,boost::xint::integer
175 #ifdef BOOST_ICL_TEST_CHRONO
176 ,boch::duration<unsigned short>
179 ,boost_posix_time_ptime
180 ,boost_posix_time_duration
181 ,boost_gregorian_date
182 ,boost_gregorian_date_duration
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;
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
207 typedef ::boost::mpl::list<
209 > signed_discrete_types;
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;
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
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>
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>
232 > numeric_continuous_types;
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;
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
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>
254 #ifdef BOOST_ICL_TEST_CHRONO
255 ,boch::duration<double>
256 ,boch::time_point<Now, boch::duration<double> >
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;
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
273 typedef ::boost::mpl::list<
284 ,boost::rational<int>
285 #ifdef BOOST_ICL_TEST_XINT
286 ,boost::xint::integer
288 #ifdef BOOST_ICL_TEST_CHRONO
289 ,boch::duration<short>
290 ,boch::duration<long double>
293 ,boost_posix_time_ptime
294 ,boost_posix_time_duration
295 ,boost_gregorian_date
296 ,boost_gregorian_date_duration
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;
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