]> git.lyx.org Git - lyx.git/blob - boost/boost/re_detail/regex_options.hpp
cvsignore ++
[lyx.git] / boost / boost / re_detail / regex_options.hpp
1
2 #ifndef BOOST_RE_OPT_H
3 #define BOOST_RE_OPT_H
4
5 /* #define BOOST_RE_AUTO_CONFIGURE */
6 #ifdef BOOST_RE_AUTO_CONFIGURE
7
8 /* Compiler options: */
9
10 /* BOOST_NO_STDC_NAMESPACE         C library not in namespace std */
11 /* #define BOOST_NO_STDC_NAMESPACE */
12
13 /* BOOST_RE_NO_MUTABLE             Disables use of mutable keyword. */
14 /* #define BOOST_RE_NO_MUTABLE */
15
16 /* BOOST_RE_INT32_LONG            If 32-bit integers are long */
17 /* #define BOOST_RE_INT32_LONG */
18
19 /* BOOST_RE_NO_TEMPLATE_FRIEND     If template friend declarations are not supported */
20 /* #define BOOST_RE_NO_TEMPLATE_FRIEND */
21
22 /* BOOST_RE_PLATFORM_WINDOWS       Platform is MS Windows. */
23 /* #define BOOST_RE_PLATFORM_WINDOWS */
24
25 /* BOOST_RE_PLATFORM_DOS           Platform if MSDOS. */
26 /* #define BOOST_RE_PLATFORM_DOS */
27
28 /* BOOST_RE_PLATFORM_W32           Platform is MS Win32 */
29 /* #define BOOST_RE_PLATFORM_W32 */
30
31 /* BOOST_RE_NO_W32               Disable Win32 support even when present */
32 /* #define BOOST_RE_NO_W32 */
33
34 /* BOOST_RE_NO_BOOL                If bool is not a distict type. */
35 /* #define BOOST_RE_NO_BOOL */
36
37 /* BOOST_RE_NO_WCHAR_H             If there is no <wchar.h> */
38 /* #define BOOST_RE_NO_WCHAR_H */
39
40 /* BOOST_RE_NO_WCTYPE_H            If there is no <wctype.h> */
41 /* #define BOOST_RE_NO_WCTYPE_H */
42
43 /* BOOST_RE_NO_WCSTRING            If there are no wcslen and wcsncmp functions available. */
44 /* #define BOOST_RE_NO_WCSTRING */
45
46 /* BOOST_RE_NO_SWPRINTF            If there is no swprintf available. */
47 /* #define BOOST_RE_NO_SWPRINTF */
48
49 /* BOOST_RE_NO_WSPRINTF            If there is no wsprintf available. */
50 /* #define BOOST_RE_NO_WSPRINTF */
51
52 /* BOOST_RE_NO_MEMBER_TEMPLATES    If member function templates or nested template classes are not allowed. */
53 /* #define BOOST_RE_NO_MEMBER_TEMPLATES */
54
55 /* BOOST_RE_NO_TEMPLATE_RETURNS    If template functions based on return type are not supported. */
56 /* #define BOOST_RE_NO_TEMPLATE_RETURNS */
57
58 /* BOOST_RE_NO_PARTIAL_FUNC_SPEC   If partial template function specialisation is not supported */
59 /* #define BOOST_RE_NO_PARTIAL_FUNC_SPEC */
60
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
66                              1 = short
67                       2 = int
68                       3 = long
69                       4 = int64_t
70                       5 = long long
71                       6 = __int64 */
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 */
79
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 */
83
84 /* BOOST_RE_THREADS                Define if the compiler supports multiple threads in
85                              the current translation mode. */
86 /* #define BOOST_RE_THREADS */
87
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 */
92
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 */
96
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 */
99
100 /* BOOST_RE_NO_TEMPLATE_MERGE_A    If template merging from library archives is not supported */
101 /* #define BOOST_RE_NO_TEMPLATE_MERGE_A */
102
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 */
105
106 /* BOOST_RE_CALL                   Optionally define a calling convention for C++ functions */
107 /* #define BOOST_RE_CALL */
108
109 /* BOOST_RE_CCALL                  Optionally define a calling convention for C functions */
110 /* #define BOOST_RE_CCALL */
111
112 /* BOOST_RE_SIZEOF_SHORT           sizeof(short) */
113 /* #define BOOST_RE_SIZEOF_SHORT */
114
115 /* BOOST_RE_SIZEOF_INT             sizeof(int) */
116 /* #define BOOST_RE_SIZEOF_INT */
117
118 /* BOOST_RE_SIZEOF_LONG            sizeof(long) */
119 /* #define BOOST_RE_SIZEOF_LONG */
120
121 /* BOOST_RE_SIZEOF_WCHAR_T         sizeof(wchar_t) */
122 /* #define BOOST_RE_SIZEOF_WCHAR_T */
123
124
125 /* STL options: */
126
127 /* BOOST_RE_NO_EXCEPTION_H         Define if you do not a compliant <exception>
128                              header file. */
129 /* #define BOOST_RE_NO_EXCEPTION_H */
130
131 /* BOOST_RE_NO_ITERATOR_H          Define if you do not have a version of <iterator>. */
132 /* #define BOOST_RE_NO_ITERATOR_H */
133
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 */
139
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 */
143
144 /* BOOST_RE_NO_STL                 Disables the use of any supporting STL code. */
145 /* #define BOOST_RE_NO_STL */
146
147 /* BOOST_RE_NO_NOT_EQUAL           Disables the generation of operator!= if this
148                              clashes with the STL version. */
149
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 */
154
155 /* BOOST_RE_USE_ALGO               If <algo.h> not <algorithm> is present */
156 /* #define BOOST_RE_USE_ALGO */
157
158 /* BOOST_RE_OLD_IOSTREAM           If the new iostreamm classes are not available */
159 /* #define BOOST_RE_OLD_IOSTREAM */
160
161 /* BOOST_RE_DISTANCE_T             For std::distance:
162                              0 = NA
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 */
168
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 */
176
177 /* BOOST_RE_OI_T                   For output iterators:
178                              0 = NA
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 */
186
187 /* BOOST_RE_II_T                   For input iterators:
188                              0 = NA
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 */
198
199
200 /* BOOST_RE_FI_T                   For forward iterators:
201                              0 = NA
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 */
209
210 /* BOOST_RE_BI_T                   For bidirectional iterators:
211                              0 = NA
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 */
219
220 /* BOOST_RE_RI_T                   For random access iterators:
221                              0 = NA
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 */
229
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 */
233
234
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
255 #else
256 syntax error: unknown value for BOOST_RE_INT64_T
257 #endif
258
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))
265 #else
266 syntax erorr
267 #endif
268
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
272 #endif
273 #ifndef BOOST_RE_II_T_0
274 #define BOOST_RE_II_T_0 BOOST_RE_ITERATOR_T_0
275 #endif
276 #ifndef BOOST_RE_FI_T_0
277 #define BOOST_RE_FI_T_0 BOOST_RE_ITERATOR_T_0
278 #endif
279 #ifndef BOOST_RE_BI_T_0
280 #define BOOST_RE_BI_T_0 BOOST_RE_ITERATOR_T_0
281 #endif
282 #ifndef BOOST_RE_RI_T_0
283 #define BOOST_RE_RI_T_0 BOOST_RE_ITERATOR_T_0
284 #endif
285 #endif
286
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
290 #endif
291 #ifndef BOOST_RE_II_T_1
292 #define BOOST_RE_II_T_1 BOOST_RE_ITERATOR_T_1
293 #endif
294 #ifndef BOOST_RE_FI_T_1
295 #define BOOST_RE_FI_T_1 BOOST_RE_ITERATOR_T_1
296 #endif
297 #ifndef BOOST_RE_BI_T_1
298 #define BOOST_RE_BI_T_1 BOOST_RE_ITERATOR_T_1
299 #endif
300 #ifndef BOOST_RE_RI_T_1
301 #define BOOST_RE_RI_T_1 BOOST_RE_ITERATOR_T_1
302 #endif
303 #endif
304
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
308 #endif
309 #ifndef BOOST_RE_II_T_2
310 #define BOOST_RE_II_T_2 BOOST_RE_ITERATOR_T_2
311 #endif
312 #ifndef BOOST_RE_FI_T_2
313 #define BOOST_RE_FI_T_2 BOOST_RE_ITERATOR_T_2
314 #endif
315 #ifndef BOOST_RE_BI_T_2
316 #define BOOST_RE_BI_T_2 BOOST_RE_ITERATOR_T_2
317 #endif
318 #ifndef BOOST_RE_RI_T_2
319 #define BOOST_RE_RI_T_2 BOOST_RE_ITERATOR_T_2
320 #endif
321 #endif
322
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
326 #endif
327 #ifndef BOOST_RE_II_T_3
328 #define BOOST_RE_II_T_3 BOOST_RE_ITERATOR_T_3
329 #endif
330 #ifndef BOOST_RE_FI_T_3
331 #define BOOST_RE_FI_T_3 BOOST_RE_ITERATOR_T_3
332 #endif
333 #ifndef BOOST_RE_BI_T_3
334 #define BOOST_RE_BI_T_3 BOOST_RE_ITERATOR_T_3
335 #endif
336 #ifndef BOOST_RE_RI_T_3
337 #define BOOST_RE_RI_T_3 BOOST_RE_ITERATOR_T_3
338 #endif
339 #endif
340
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
344 #endif
345 #ifndef BOOST_RE_II_T_4
346 #define BOOST_RE_II_T_4 BOOST_RE_ITERATOR_T_4
347 #endif
348 #ifndef BOOST_RE_FI_T_4
349 #define BOOST_RE_FI_T_4 BOOST_RE_ITERATOR_T_4
350 #endif
351 #ifndef BOOST_RE_BI_T_4
352 #define BOOST_RE_BI_T_4 BOOST_RE_ITERATOR_T_4
353 #endif
354 #ifndef BOOST_RE_RI_T_4
355 #define BOOST_RE_RI_T_4 BOOST_RE_ITERATOR_T_4
356 #endif
357 #endif
358
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
367 #else
368 syntax error
369 #endif
370
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>
381 #else
382 syntax error
383 #endif
384
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>
393 #else
394 syntax error
395 #endif
396
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>
405 #else
406 syntax error
407 #endif
408
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>
417 #else
418 syntax error
419 #endif
420
421
422 #ifndef BOOST_RE_NO_EXCEPTION_H
423 #include <exception>
424 #endif
425
426 #ifndef BOOST_RE_NO_ITERATOR_H
427 #include <iterator>
428 #ifdef BOOST_RE_USE_ALGO
429 #include <algo.h>
430 #else
431 #include <algorithm>
432 #endif
433 #endif
434
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
441
442  #define BOOST_RE_NEED_BINDER
443  #define BOOST_RE_NEED_ALLOC
444 #else
445 #include <memory>
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>
450 #endif
451
452
453 #endif // BOOST_RE_AUTO_CONFIGURE
454
455
456 #endif /* BOOST_RE_OPT_H */
457
458
459
460
461
462
463
464
465
466
467