5 /* #define BOOST_RE_AUTO_CONFIGURE */
6 #ifdef BOOST_RE_AUTO_CONFIGURE
8 /* Compiler options: */
10 /* BOOST_NO_STDC_NAMESPACE C library not in namespace std */
11 /* #define BOOST_NO_STDC_NAMESPACE */
13 /* BOOST_RE_NO_MUTABLE Disables use of mutable keyword. */
14 /* #define BOOST_RE_NO_MUTABLE */
16 /* BOOST_RE_INT32_LONG If 32-bit integers are long */
17 /* #define BOOST_RE_INT32_LONG */
19 /* BOOST_RE_NO_TEMPLATE_FRIEND If template friend declarations are not supported */
20 /* #define BOOST_RE_NO_TEMPLATE_FRIEND */
22 /* BOOST_RE_PLATFORM_WINDOWS Platform is MS Windows. */
23 /* #define BOOST_RE_PLATFORM_WINDOWS */
25 /* BOOST_RE_PLATFORM_DOS Platform if MSDOS. */
26 /* #define BOOST_RE_PLATFORM_DOS */
28 /* BOOST_RE_PLATFORM_W32 Platform is MS Win32 */
29 /* #define BOOST_RE_PLATFORM_W32 */
31 /* BOOST_RE_NO_W32 Disable Win32 support even when present */
32 /* #define BOOST_RE_NO_W32 */
34 /* BOOST_RE_NO_BOOL If bool is not a distict type. */
35 /* #define BOOST_RE_NO_BOOL */
37 /* BOOST_RE_NO_WCHAR_H If there is no <wchar.h> */
38 /* #define BOOST_RE_NO_WCHAR_H */
40 /* BOOST_RE_NO_WCTYPE_H If there is no <wctype.h> */
41 /* #define BOOST_RE_NO_WCTYPE_H */
43 /* BOOST_RE_NO_WCSTRING If there are no wcslen and wcsncmp functions available. */
44 /* #define BOOST_RE_NO_WCSTRING */
46 /* BOOST_RE_NO_SWPRINTF If there is no swprintf available. */
47 /* #define BOOST_RE_NO_SWPRINTF */
49 /* BOOST_RE_NO_WSPRINTF If there is no wsprintf available. */
50 /* #define BOOST_RE_NO_WSPRINTF */
52 /* BOOST_RE_NO_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
53 /* #define BOOST_RE_NO_MEMBER_TEMPLATES */
55 /* BOOST_RE_NO_TEMPLATE_RETURNS If template functions based on return type are not supported. */
56 /* #define BOOST_RE_NO_TEMPLATE_RETURNS */
58 /* BOOST_RE_NO_PARTIAL_FUNC_SPEC If partial template function specialisation is not supported */
59 /* #define BOOST_RE_NO_PARTIAL_FUNC_SPEC */
61 /* BOOST_RE_NO_INT64 If 64bit integers are not supported. */
62 /* BOOST_RE_INT64t The type of a 64-bit signed integer if available. */
63 /* BOOST_RE_IMM64(val) Declares a 64-bit immediate value by appending any
64 necessary suffix to val. */
65 /* BOOST_RE_INT64_T 0 = NA
72 /* #define BOOST_RE_INT64_T_0 */
73 /* #define BOOST_RE_INT64_T_1 */
74 /* #define BOOST_RE_INT64_T_2 */
75 /* #define BOOST_RE_INT64_T_3 */
76 /* #define BOOST_RE_INT64_T_4 */
77 /* #define BOOST_RE_INT64_T_5 */
78 /* #define BOOST_RE_INT64_T_6 */
80 /* BOOST_RE_NO_CAT Define if the compiler does not support POSIX style
81 message categories (catopen catgets catclose). */
82 /* #define BOOST_RE_NO_CAT */
84 /* BOOST_RE_THREADS Define if the compiler supports multiple threads in
85 the current translation mode. */
86 /* #define BOOST_RE_THREADS */
88 /* BOOST_RE_NESTED_TEMPLATE_DECL Defaults to template, the standard prefix when accessing
89 nested template classes, can be redefined to nothing if
90 the compiler does not support this. */
91 /* #define BOOST_RE_NESTED_TEMPLATE_DECL */
93 /* BOOST_RE_NO_TEMPLATE_INST If explicit template instantiation with the "template class X<T>"
94 syntax is not supported */
95 /* #define BOOST_RE_NO_TEMPLATE_INST */
97 /* BOOST_RE_NO_TEMPLATE_MERGE If template in separate translation units don't merge at link time */
98 /* #define BOOST_RE_NO_TEMPLATE_MERGE */
100 /* BOOST_RE_NO_TEMPLATE_MERGE_A If template merging from library archives is not supported */
101 /* #define BOOST_RE_NO_TEMPLATE_MERGE_A */
103 /* BOOST_RE_NO_TEMPLATE_SWITCH_MERGE If merging of templates containing switch statements is not supported */
104 /* #define BOOST_RE_NO_TEMPLATE_SWITCH_MERGE */
106 /* BOOST_RE_CALL Optionally define a calling convention for C++ functions */
107 /* #define BOOST_RE_CALL */
109 /* BOOST_RE_CCALL Optionally define a calling convention for C functions */
110 /* #define BOOST_RE_CCALL */
112 /* BOOST_RE_SIZEOF_SHORT sizeof(short) */
113 /* #define BOOST_RE_SIZEOF_SHORT */
115 /* BOOST_RE_SIZEOF_INT sizeof(int) */
116 /* #define BOOST_RE_SIZEOF_INT */
118 /* BOOST_RE_SIZEOF_LONG sizeof(long) */
119 /* #define BOOST_RE_SIZEOF_LONG */
121 /* BOOST_RE_SIZEOF_WCHAR_T sizeof(wchar_t) */
122 /* #define BOOST_RE_SIZEOF_WCHAR_T */
127 /* BOOST_RE_NO_EXCEPTION_H Define if you do not a compliant <exception>
129 /* #define BOOST_RE_NO_EXCEPTION_H */
131 /* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
132 /* #define BOOST_RE_NO_ITERATOR_H */
134 /* BOOST_RE_NO_MEMORY_H Define if <memory> does not fully comply with the
135 latest standard, and is not auto-recognised,
136 that means nested template classes
137 which hardly any compilers support at present. */
138 /* #define BOOST_RE_NO_MEMORY_H */
140 /* BOOST_RE_NO_LOCALE_H Define if there is no verion of the standard
141 <locale> header available. */
142 /* #define BOOST_RE_NO_LOCALE_H */
144 /* BOOST_RE_NO_STL Disables the use of any supporting STL code. */
145 /* #define BOOST_RE_NO_STL */
147 /* BOOST_RE_NO_NOT_EQUAL Disables the generation of operator!= if this
148 clashes with the STL version. */
150 /* BOOST_RE_NO_STRING_DEF_ARGS Define if std::basic_string<charT> not allowed - in
151 other words if the template is missing its required
152 default arguments. */
153 /* #define BOOST_RE_NO_STRING_DEF_ARGS */
155 /* BOOST_RE_USE_ALGO If <algo.h> not <algorithm> is present */
156 /* #define BOOST_RE_USE_ALGO */
158 /* BOOST_RE_OLD_IOSTREAM If the new iostreamm classes are not available */
159 /* #define BOOST_RE_OLD_IOSTREAM */
161 /* BOOST_RE_DISTANCE_T For std::distance:
163 1 = std::distance(i, j, n)
164 2 = n = std::distance(i, j) */
165 /* #define BOOST_RE_DISTANCE_T_0 */
166 /* #define BOOST_RE_DISTANCE_T_1 */
167 /* #define BOOST_RE_DISTANCE_T_2 */
169 /* BOOST_RE_ITERATOR_T Defines generic standard iterator type if available, use this as
170 a shortcut to define all the other iterator types.
171 1 = std::iterator<std::tag_type, T, D, T*, T&>
172 2 = std::iterator<std::tag_type, T, D> */
173 /* #define BOOST_RE_ITERATOR_T_0 */
174 /* #define BOOST_RE_ITERATOR_T_1 */
175 /* #define BOOST_RE_ITERATOR_T_2 */
177 /* BOOST_RE_OI_T For output iterators:
179 1 = std::iterator<std::output_iterator_tag, T, D, T*, T&>
180 2 = std::iterator<std::output_iterator_tag, T, D>
181 3 = std::output_iterator */
182 /* #define BOOST_RE_OI_T_0 */
183 /* #define BOOST_RE_OI_T_1 */
184 /* #define BOOST_RE_OI_T_2 */
185 /* #define BOOST_RE_OI_T_3 */
187 /* BOOST_RE_II_T For input iterators:
189 1 = std::iterator<std::input_iterator_tag, T, D, T*, T&>
190 2 = std::iterator<std::input_iterator_tag, T, D>
191 3 = std::input_iterator<T, D>
192 4 = std::input_iterator<T> */
193 /* #define BOOST_RE_II_T_0 */
194 /* #define BOOST_RE_II_T_1 */
195 /* #define BOOST_RE_II_T_2 */
196 /* #define BOOST_RE_II_T_3 */
197 /* #define BOOST_RE_II_T_4 */
200 /* BOOST_RE_FI_T For forward iterators:
202 1 = std::iterator<std::forward_iterator_tag, T, D, T*, T&>
203 2 = std::iterator<std::forward_iterator_tag, T, D>
204 3 = std::forward_iterator<T, D> */
205 /* #define BOOST_RE_FI_T_0 */
206 /* #define BOOST_RE_FI_T_1 */
207 /* #define BOOST_RE_FI_T_2 */
208 /* #define BOOST_RE_FI_T_3 */
210 /* BOOST_RE_BI_T For bidirectional iterators:
212 1 = std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
213 2 = std::iterator<std::bidirectional_iterator_tag, T, D>
214 3 = std::bidirectional_iterator<T, D> */
215 /* #define BOOST_RE_BI_T_0 */
216 /* #define BOOST_RE_BI_T_1 */
217 /* #define BOOST_RE_BI_T_2 */
218 /* #define BOOST_RE_BI_T_3 */
220 /* BOOST_RE_RI_T For random access iterators:
222 1 = std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
223 2 = std::iterator<std::random_access_iterator_tag, T, D>
224 3 = std::random_access_iterator<T, D> */
225 /* #define BOOST_RE_RI_T_0 */
226 /* #define BOOST_RE_RI_T_1 */
227 /* #define BOOST_RE_RI_T_2 */
228 /* #define BOOST_RE_RI_T_3 */
230 /* BOOST_RE_NO_OI_ASSIGN If output iterators ostream_iterator<>, back_insert_iterator<> and
231 front_insert_iterator<> do not have assignment operators */
232 /* #define BOOST_RE_NO_OI_ASSIGN */
235 #ifdef BOOST_RE_INT64_T_0
236 #define BOOST_RE_NO_INT64
237 #elif defined(BOOST_RE_INT64_T_1)
238 #define BOOST_RE_INT64t short
239 #define BOOST_RE_IMM64(val) val
240 #elif defined(BOOST_RE_INT64_T_2)
241 #define BOOST_RE_INT64t int
242 #define BOOST_RE_IMM64(val) val
243 #elif defined(BOOST_RE_INT64_T_3)
244 #define BOOST_RE_INT64t long
245 #define BOOST_RE_IMM64(val) val##L
246 #elif defined(BOOST_RE_INT64_T_4)
247 #define BOOST_RE_INT64t int64_t
248 #define BOOST_RE_IMM64(val) INT64_C(val)
249 #elif defined(BOOST_RE_INT64_T_5)
250 #define BOOST_RE_INT64t long long
251 #define BOOST_RE_IMM64(val) val##LL
252 #elif defined(BOOST_RE_INT64_T_6)
253 #define BOOST_RE_INT64t __int64
254 #define BOOST_RE_IMM64(val) val##i64
256 syntax error: unknown value for BOOST_RE_INT64_T
259 #ifdef BOOST_RE_DISTANCE_T_0
260 # define BOOST_RE_DISTANCE(i, j, n) n = j - i
261 #elif defined(BOOST_RE_DISTANCE_T_1)
262 # define BOOST_RE_DISTANCE(i, j, n) n = std::distance(i, j)
263 #elif defined(BOOST_RE_DISTANCE_T_2)
264 # define BOOST_RE_DISTANCE(i, j, n) (n = 0, std::distance(i, j, n))
269 #ifdef BOOST_RE_ITERATOR_T_0
270 #ifndef BOOST_RE_OI_T_0
271 #define BOOST_RE_OI_T_0 BOOST_RE_ITERATOR_T_0
273 #ifndef BOOST_RE_II_T_0
274 #define BOOST_RE_II_T_0 BOOST_RE_ITERATOR_T_0
276 #ifndef BOOST_RE_FI_T_0
277 #define BOOST_RE_FI_T_0 BOOST_RE_ITERATOR_T_0
279 #ifndef BOOST_RE_BI_T_0
280 #define BOOST_RE_BI_T_0 BOOST_RE_ITERATOR_T_0
282 #ifndef BOOST_RE_RI_T_0
283 #define BOOST_RE_RI_T_0 BOOST_RE_ITERATOR_T_0
287 #ifdef BOOST_RE_ITERATOR_T_1
288 #ifndef BOOST_RE_OI_T_1
289 #define BOOST_RE_OI_T_1 BOOST_RE_ITERATOR_T_1
291 #ifndef BOOST_RE_II_T_1
292 #define BOOST_RE_II_T_1 BOOST_RE_ITERATOR_T_1
294 #ifndef BOOST_RE_FI_T_1
295 #define BOOST_RE_FI_T_1 BOOST_RE_ITERATOR_T_1
297 #ifndef BOOST_RE_BI_T_1
298 #define BOOST_RE_BI_T_1 BOOST_RE_ITERATOR_T_1
300 #ifndef BOOST_RE_RI_T_1
301 #define BOOST_RE_RI_T_1 BOOST_RE_ITERATOR_T_1
305 #ifdef BOOST_RE_ITERATOR_T_2
306 #ifndef BOOST_RE_OI_T_2
307 #define BOOST_RE_OI_T_2 BOOST_RE_ITERATOR_T_2
309 #ifndef BOOST_RE_II_T_2
310 #define BOOST_RE_II_T_2 BOOST_RE_ITERATOR_T_2
312 #ifndef BOOST_RE_FI_T_2
313 #define BOOST_RE_FI_T_2 BOOST_RE_ITERATOR_T_2
315 #ifndef BOOST_RE_BI_T_2
316 #define BOOST_RE_BI_T_2 BOOST_RE_ITERATOR_T_2
318 #ifndef BOOST_RE_RI_T_2
319 #define BOOST_RE_RI_T_2 BOOST_RE_ITERATOR_T_2
323 #ifdef BOOST_RE_ITERATOR_T_3
324 #ifndef BOOST_RE_OI_T_3
325 #define BOOST_RE_OI_T_3 BOOST_RE_ITERATOR_T_3
327 #ifndef BOOST_RE_II_T_3
328 #define BOOST_RE_II_T_3 BOOST_RE_ITERATOR_T_3
330 #ifndef BOOST_RE_FI_T_3
331 #define BOOST_RE_FI_T_3 BOOST_RE_ITERATOR_T_3
333 #ifndef BOOST_RE_BI_T_3
334 #define BOOST_RE_BI_T_3 BOOST_RE_ITERATOR_T_3
336 #ifndef BOOST_RE_RI_T_3
337 #define BOOST_RE_RI_T_3 BOOST_RE_ITERATOR_T_3
341 #ifdef BOOST_RE_ITERATOR_T_4
342 #ifndef BOOST_RE_OI_T_4
343 #define BOOST_RE_OI_T_4 BOOST_RE_ITERATOR_T_4
345 #ifndef BOOST_RE_II_T_4
346 #define BOOST_RE_II_T_4 BOOST_RE_ITERATOR_T_4
348 #ifndef BOOST_RE_FI_T_4
349 #define BOOST_RE_FI_T_4 BOOST_RE_ITERATOR_T_4
351 #ifndef BOOST_RE_BI_T_4
352 #define BOOST_RE_BI_T_4 BOOST_RE_ITERATOR_T_4
354 #ifndef BOOST_RE_RI_T_4
355 #define BOOST_RE_RI_T_4 BOOST_RE_ITERATOR_T_4
359 #ifdef BOOST_RE_OI_T_0
360 # define BOOST_RE_OUTPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
361 #elif defined(BOOST_RE_OI_T_1)
362 # define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
363 #elif defined(BOOST_RE_OI_T_2)
364 # define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D>
365 #elif defined(BOOST_RE_OI_T_3)
366 # define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
371 #ifdef BOOST_RE_II_T_0
372 # define BOOST_RE_INPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
373 #elif defined(BOOST_RE_II_T_1)
374 #define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
375 #elif defined(BOOST_RE_II_T_2)
376 #define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D>
377 #elif defined(BOOST_RE_II_T_3)
378 # define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
379 #elif defined(BOOST_RE_II_T_4)
380 # define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T>
385 #ifdef BOOST_RE_FI_T_0
386 # define BOOST_RE_FWD_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
387 #elif defined(BOOST_RE_FI_T_1)
388 # define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
389 #elif defined(BOOST_RE_FI_T_2)
390 # define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D>
391 #elif defined(BOOST_RE_FI_T_3)
392 # define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
397 #ifdef BOOST_RE_BI_T_0
398 # define BOOST_RE_BIDI_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
399 #elif defined(BOOST_RE_BI_T_1)
400 # define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
401 #elif defined(BOOST_RE_BI_T_2)
402 # define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D>
403 #elif defined(BOOST_RE_BI_T_3)
404 # define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
409 #ifdef BOOST_RE_RI_T_0
410 # define BOOST_RE_RA_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
411 #elif defined(BOOST_RE_RI_T_1)
412 # define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
413 #elif defined(BOOST_RE_RI_T_2)
414 # define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D>
415 #elif defined(BOOST_RE_RI_T_3)
416 # define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
422 #ifndef BOOST_RE_NO_EXCEPTION_H
426 #ifndef BOOST_RE_NO_ITERATOR_H
428 #ifdef BOOST_RE_USE_ALGO
435 #if defined(BOOST_RE_NO_MEMORY_H) || defined(__GNUC__)
436 #define BOOST_RE_OLD_ALLOCATORS
437 #define REBIND_INSTANCE(x, y, inst) re_alloc_binder<x, y>(inst)
438 #define REBIND_TYPE(x, y) re_alloc_binder<x, y>
439 #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_DEFAULT_PARAM( boost::re_detail::jm_def_alloc )
440 #define BOOST_RE_DEF_ALLOC(x) boost::re_detail::jm_def_alloc
442 #define BOOST_RE_NEED_BINDER
443 #define BOOST_RE_NEED_ALLOC
446 #define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
447 #define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
448 #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
449 #define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
453 #endif // BOOST_RE_AUTO_CONFIGURE
456 #endif /* BOOST_RE_OPT_H */