]> git.lyx.org Git - lyx.git/blob - boost/boost/re_detail/regex_config.hpp
update libtool
[lyx.git] / boost / boost / re_detail / regex_config.hpp
1 /*
2  *
3  * Copyright (c) 1998-2000
4  * Dr John Maddock
5  *                                                          
6  * Permission to use, copy, modify, distribute and sell this software
7  * and its documentation for any purpose is hereby granted without fee,
8  * provided that the above copyright notice appear in all copies and
9  * that both that copyright notice and this permission notice appear
10  * in supporting documentation.  Dr John Maddock makes no representations
11  * about the suitability of this software for any purpose.  
12  * It is provided "as is" without express or implied warranty.
13  *
14  */
15  
16  /*
17   *   LOCATION:    see http://www.boost.org for most recent version.
18   *   FILE         regex_config.hpp
19   *   VERSION      3.03
20   *   DESCRIPTION: auto-configure options for regular expression code.
21   */
22
23 #ifndef BOOST_REGEX_CONFIG_HPP
24 #define BOOST_REGEX_CONFIG_HPP
25
26 /************************************************************************
27
28 The purpose of this header is to provide compiler and STL configuration
29 options.  Options fall into three categaries (namespaces, compiler and STL),
30 throughout, the defaults assume that the compiler and STL are fully C++ standard
31 compliant, features that are not supported on your system may be selectively
32 turned off by defining the appropriate macros.  Borland C++, Borland C++ Builder,
33 and Microsoft Visual C++ should be auto-recognised and configured. The HP aCC and 
34 SunPro C++ compiler should also be supported - but run configure for best results.
35 The SGI, HP, Microsoft and Rogue Wave STL's should be auto-recognised and configured.
36 Do not change this file unless you really really have to, add options to
37 <boost/re_detail/_opt.h> instead. See <jm_opt.h> for a full list of macros and their usage.
38
39 ************************************************************************/
40
41 /* LGB */
42 #include <boost/config.h>
43
44 #include <boost/re_detail/regex_options.hpp>
45
46 #ifdef __cplusplus
47 #include <cstdlib>
48 #include <cstddef>
49 #include <cstring>
50 #include <cctype>
51 #include <cstdio>
52 #include <clocale>
53 #include <string>
54 #include <boost/smart_ptr.hpp>
55 #else
56 //
57 // C build,
58 // don't include <boost/config.hpp> because that may
59 // do C++ specific things in future...
60 //
61 #include <stdlib.h>
62 #ifdef _MSC_VER
63 #define BOOST_MSVC _MSC_VER
64 #endif
65 #endif
66
67 /* this will increase in future versions: */
68 #define BOOST_RE_VERSION 300
69
70 // fix:
71 #if defined(_UNICODE) && !defined(UNICODE)
72 #define UNICODE
73 #endif
74
75 #ifndef BOOST_RE_AUTO_CONFIGURE
76 #if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(__GNUC__)
77    #define BOOST_RE_PLATFORM_W32
78 #endif
79
80 #ifdef __MWERKS__
81 // no std::maessages facet
82 #define BOOST_RE_NO_MESSAGES
83 #endif
84
85 #ifdef __BORLANDC__
86
87    #if __BORLANDC__ < 0x500
88       #define BOOST_RE_NO_NAMESPACES
89       #define BOOST_RE_NO_BOOL
90       #define BOOST_RE_NO_MUTABLE
91    #endif
92
93    #if __BORLANDC__ < 0x520
94       #define BOOST_RE_NO_WCSTRING
95       #define BOOST_RE_NO_INT64
96       // Early versions of Borlands namespace code can't cope with iterators
97       // that are in different namespaces from STL code.
98       #define boost std
99       #define BOOST_RE_NO_NOT_EQUAL
100    #endif
101
102    #if __BORLANDC__ < 0x530
103       #define BOOST_RE_NO_WCTYPE_H
104       #define BOOST_RE_NO_WCHAR_H
105       #define BOOST_RE_OLD_IOSTREAM
106       #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
107       #define BOOST_RE_NO_EXCEPTION_H
108       #ifndef __WIN32__
109          #define BOOST_RE_NO_WCSTRING
110       #endif
111       #define BOOST_RE_NO_LOCALE_H
112       #define BOOST_RE_NO_TEMPLATE_RETURNS
113       //
114       // this is a hack to get around buggy namespace support in the
115       // 0x520 compiler version
116       #define BOOST_RE_NO_USING
117       #define BOOST_RE_USING_HACK
118       #define BOOST_RE_OLD_IOSTREAM
119    #endif
120
121    #if __BORLANDC__ < 0x540
122       #define BOOST_RE_NO_MEMBER_TEMPLATES
123       // inline contructors exhibit strange behaviour
124       // under Builder 3 and C++ 5.x when throwing exceptions
125       #define INLINE_EXCEPTION_BUG
126       #define BOOST_RE_NESTED_TEMPLATE_DECL
127       #define BOOST_RE_NO_PARTIAL_FUNC_SPEC
128       #define BOOST_RE_NO_STRING_DEF_ARGS
129       #define BOOST_RE_NO_TYPEINFO    // bad_cast etc not in namespace std.
130    #endif
131    //
132    // Builder 4 seems to have broken template friend support:
133    #define BOOST_RE_NO_TEMPLATE_FRIEND
134
135    #if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
136       // problems with std::basic_string and dll RTL:
137       #if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
138          #ifdef BOOST_RE_BUILD_DLL
139          #error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
140          #else
141          #pragma warn defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!
142          #endif
143       #endif
144       #ifndef _RTLDLL
145          // this is harmless for a staic link:
146          #define _RWSTD_COMPILE_INSTANTIATE
147       #endif
148    #endif
149
150    #ifndef _CPPUNWIND
151       #error exception handling support required
152    #endif
153
154    #ifdef _Windows
155       #define BOOST_RE_PLATFORM_WINDOWS
156    #else
157       #define BOOST_RE_PLATFORM_DOS
158    #endif
159
160    #ifndef __WIN32__
161       #define BOOST_RE_CALL
162       #define BOOST_RE_CCALL
163    #else
164       #define BOOST_RE_CALL __fastcall
165       #define BOOST_RE_CCALL __stdcall
166    #endif
167
168    #define BOOST_RE_INT64t __int64
169    #define BOOST_RE_IMM64(val) val##i64
170    #define BOOST_RE_NO_CAT
171    // broken wide character support:
172    #define BOOST_RE_NO_SWPRINTF
173
174    #ifdef __MT__
175       #define BOOST_RE_THREADS
176    #endif
177
178    //
179    // VCL support:
180    // if we're building a console app then there can't be any VCL (can there?)
181    #if !defined(__CONSOLE__) && !defined(_NO_VCL)
182       #define BOOST_RE_USE_VCL
183    #endif
184    //
185    // import export options:
186    #ifdef _RTLDLL
187       #ifdef BOOST_RE_BUILD_DLL
188          #define BOOST_RE_IX_DECL __declspec( dllexport )
189       #elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB)
190          #define BOOST_RE_IX_DECL __declspec( dllimport )
191       #endif
192    #endif
193    #include <boost/re_detail/regex_library_include.hpp>
194
195 #include <cwchar>
196 #include <cwctype>
197
198 #endif
199
200 //
201 // only want "real" Visual C++ here:
202 #if defined(BOOST_MSVC) && !defined(__WATCOMC__) && !defined(__BORLANDC__) && !defined(__GNUC__) && !defined(__MWERKS__) && !defined (__ICL)
203    #define BOOST_RE_CALL __fastcall
204    #define BOOST_RE_CCALL __stdcall
205
206    #if BOOST_MSVC < 1100
207       #define BOOST_RE_NO_NAMESPACES
208       #define BOOST_RE_NO_DEFAULT_PARAM
209       #define BOOST_RE_NO_BOOL
210       #define BOOST_RE_NO_MUTABLE
211       #define BOOST_RE_NO_WCSTRING
212       #define BOOST_RE_NO_LOCALE_H
213       #define BOOST_RE_NO_TEMPLATE_RETURNS
214       #define BOOST_RE_NO_INT64
215    #endif
216
217    #if BOOST_MSVC < 1200
218       #define BOOST_RE_NESTED_TEMPLATE_DECL
219       #define BOOST_RE_NO_STRING_DEF_ARGS
220    #endif
221
222    #if !defined(_CPPUNWIND) && defined(__cplusplus)
223       #error exception handling support required
224    #endif
225
226    #define BOOST_RE_PLATFORM_WINDOWS
227    //
228    // no support for nested template classes yet....
229    // although this part of VC6 is badly documented
230    #define BOOST_RE_NO_MEMBER_TEMPLATES
231    #define BOOST_RE_INT64t __int64
232    #define BOOST_RE_IMM64(val) val##i64
233    #define BOOST_RE_NO_CAT
234    #define BOOST_RE_NO_PARTIAL_FUNC_SPEC
235    #define BOOST_RE_NO_TEMPLATE_FRIEND
236    #define BOOST_RE_NO_SWPRINTF
237
238    #ifdef _MT
239       #define BOOST_RE_THREADS
240    #endif
241
242 #ifdef __cplusplus
243 #include <memory>
244 #include <utility>
245 #endif
246 #pragma warning(disable: 4786)
247 #pragma warning(disable: 4800)
248 #pragma warning(disable: 4200)
249 #pragma warning(disable: 4097)
250 #pragma warning(disable: 4127)
251
252    //
253    // import export options:
254    #ifdef _DLL
255       #ifdef BOOST_RE_BUILD_DLL
256          #define BOOST_RE_IX_DECL __declspec( dllexport )
257       #elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB)
258          #define BOOST_RE_IX_DECL __declspec( dllimport ) 
259       #endif
260    #endif
261    #include <boost/re_detail/regex_library_include.hpp>
262
263 #endif
264
265 #ifdef __GNUC__
266    #if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 91))
267       #define BOOST_RE_NO_NAMESPACES
268       #define BOOST_RE_NO_MUTABLE
269       #define BOOST_RE_NO_MEMBER_TEMPLATES
270       #define BOOST_RE_NO_PARTIAL_FUNC_SPEC
271       #define BOOST_RE_NO_TEMPLATE_FRIEND
272    #endif
273    #ifndef __STL_USE_NAMESPACES
274       //#define BOOST_RE_NO_EXCEPTION_H
275    #endif
276    #define BOOST_RE_INT64t long long
277    #define BOOST_RE_IMM64(val) val##LL
278
279    #ifdef _WIN32
280       /* there seems to be a problem with <windows.h> in gcc */
281       #define BOOST_RE_LOCALE_C
282       #define BOOST_RE_NO_W32
283       #define BOOST_RE_NO_WCTYPE_H
284       #define BOOST_RE_NO_TEMPLATE_SWITCH_MERGE
285    #endif
286    #define BOOST_RE_NO_CAT
287    #define BOOST_RE_NESTED_TEMPLATE_DECL
288    #define BOOST_RE_NO_SWPRINTF
289    #include <string>
290    #ifdef __BASTRING__
291         #define BOOST_RE_NO_WCSTRING
292    #endif
293    //
294    // for now we'll always define these
295    // unless we know that the platform can cope
296    // with woide character strings:
297    #if !defined(linux)
298         #define BOOST_RE_NO_WCTYPE_H
299         #define BOOST_RE_NO_WCSTRING
300    #endif
301
302 #endif
303
304 #ifdef __MWERKS__
305    #define BOOST_RE_NO_CAT
306 #endif
307
308 #ifdef __SUNPRO_CC
309    #if (__SUNPRO_CC < 0x500)
310       #define BOOST_RE_NO_NAMESPACES
311       #define BOOST_RE_NO_MUTABLE
312       #define BOOST_RE_NO_MEMBER_TEMPLATES
313       #define BOOST_RE_OLD_IOSTREAM
314    #endif
315    #ifndef __STL_USE_NAMESPACES
316       #define BOOST_RE_NO_EXCEPTION_H
317    #endif
318    #define BOOST_RE_INT64t long long
319    #define BOOST_RE_IMM64(val) val##LL
320    #define BOOST_RE_NESTED_TEMPLATE_DECL
321    #define BOOST_RE_NO_SWPRINTF
322    #define BOOST_RE_NO_TEMPLATE_FRIEND
323 #endif
324
325 #ifdef __HP_aCC
326    // putative HP aCC support, run configure for
327    // support tailored to your system....
328    #define BOOST_RE_NO_NAMESPACES
329    #define BOOST_RE_NO_MUTABLE
330    #define BOOST_RE_NO_MEMBER_TEMPLATES
331    #define BOOST_RE_OLD_IOSTREAM
332    #ifndef __STL_USE_NAMESPACES
333       #define BOOST_RE_NO_EXCEPTION_H
334    #endif
335    #define BOOST_RE_INT64t long long
336    #define BOOST_RE_IMM64(val) val##LL
337    #define BOOST_RE_NESTED_TEMPLATE_DECL
338    #define BOOST_RE_NO_TEMPLATE_FRIEND
339    #define BOOST_RE_NO_SWPRINTF
340 #endif
341
342 #ifdef __sgi // SGI IRIX C++
343 #define BOOST_RE_NO_SWPRINTF
344 #if defined(__SGI_STL_PORT)
345 // STLPort on IRIX is misconfigured: <cwctype> does not compile
346 // as a temporary fix include <wctype.h> instead and prevent inclusion
347 // of STLPort version of <cwctype>
348 #include <wctype.h>
349 #define __STLPORT_CWCTYPE
350 #define BOOST_RE_NO_WCTYPE_H
351 #endif
352 #endif
353
354 #if defined __KCC
355 // Kai 3.4 appears to have no wide character string support:
356 #   if __KCC_VERSION <= 3499
357 #    define BOOST_RE_NO_WCSTRING
358 #   endif
359 #endif
360
361 #endif  // BOOST_RE_AUTO_CONFIGURE
362
363 #ifdef __cplusplus
364 #ifndef BOOST_RE_NO_WCSTRING
365 #ifndef BOOST_RE_NO_WCTYPE_H
366 #include <cwctype>
367 #endif
368 #ifndef BOOST_RE_NO_WCHAR_H
369 #include <cwchar>
370 #endif
371 #endif
372 #endif
373
374 #ifdef BOOST_RE_NO_NAMESPACES
375 #define BOOST_RE_MAYBE_ACCESS_SPEC ::
376 #else
377 #define BOOST_RE_MAYBE_ACCESS_SPEC 
378 #endif
379
380 #if !defined(BOOST_RE_INT64t) || !defined(BOOST_RE_IMM64)
381 #define BOOST_RE_NO_INT64
382 #endif
383
384 #ifndef BOOST_RE_INT32_LONG
385 typedef unsigned int jm_uintfast32_t;
386 #else
387 typedef unsigned long jm_uintfast32_t;
388 #endif
389
390 #ifndef BOOST_RE_NESTED_TEMPLATE_DECL
391 #define BOOST_RE_NESTED_TEMPLATE_DECL template
392 #endif
393
394 #ifndef BOOST_RE_IX_DECL
395 #define BOOST_RE_IX_DECL
396 #endif
397
398 #ifndef MB_CUR_MAX
399 // yuk!
400 // better make a conservative guess!
401 #define MB_CUR_MAX 10
402 #endif
403
404
405 /* everything else is C++: */
406
407 #ifdef __cplusplus
408
409 /* define macro's to make default parameter declaration easier: */
410
411 #ifdef BOOST_RE_NO_DEFAULT_PARAM
412    #define BOOST_RE_DEFAULT_PARAM(x)
413    #define BOOST_RE_TRICKY_DEFAULT_PARAM(x)
414 #elif defined(BOOST_RE_NO_TRICKY_DEFAULT_PARAM)
415    #define BOOST_RE_DEFAULT_PARAM(x) = x
416    #define BOOST_RE_TRICKY_DEFAULT_PARAM(x)
417 #else
418    #define BOOST_RE_DEFAULT_PARAM(x) = x
419    #define BOOST_RE_TRICKY_DEFAULT_PARAM(x) = x
420 #endif
421
422 /* STL configuration goes here: */
423
424 #ifndef BOOST_RE_AUTO_CONFIGURE
425 #ifdef BOOST_RE_NO_STL
426    #define BOOST_RE_NO_EXCEPTION_H
427    #define BOOST_RE_NO_ITERATOR_H
428    #define BOOST_RE_NO_MEMORY_H
429    #define BOOST_RE_NO_LOCALE_H
430    #define BOOST_RE_NO_STRING_H
431 #endif
432
433 #ifndef BOOST_RE_NO_EXCEPTION_H
434    #include <exception>
435 #endif
436
437 #ifndef BOOST_RE_NO_ITERATOR_H
438    #include <iterator>
439
440    #if defined(__SGI_STL_INTERNAL_ITERATOR_H) || defined(__SGI_STL_ITERATOR_H)
441
442       /* we are using SGI's STL
443        some of these (std)
444        may be guesswork: */
445
446       # if !defined (__SGI_STL_OWN_IOSTREAMS) || defined (__STL_HAS_NO_NEW_IOSTREAMS) || defined (__STL_USE_NO_IOSTREAMS) || defined(__STL_NO_MBSTATE_T)
447          // Old IO streams:
448          #define BOOST_RE_NO_LOCALE_H
449          #define BOOST_RE_OLD_IOSTREAM
450       #else
451          #ifdef __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS
452             #define BOOST_RE_USE_FACET(l, m) (*std::_Use_facet<m >(l))
453          #endif
454       #endif
455       #ifdef __BASTRING__
456         #define BOOST_RE_NO_WCSTRING
457       #endif
458       #if !defined(__STL_MEMBER_TEMPLATE_CLASSES) ||  !defined(__STL_MEMBER_TEMPLATES)
459          #define BOOST_RE_NO_MEMBER_TEMPLATES
460       #endif
461       #define BOOST_RE_NO_TYPEINFO
462
463       #ifdef __STL_NO_BOOL
464          #define BOOST_RE_NO_BOOL
465       #endif
466       #ifdef __STL_LIMITED_DEFAULT_TEMPLATES
467          #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
468          #define BOOST_RE_NO_STRING_DEF_ARGS  
469       #endif
470       #ifndef __STL_USE_EXCEPTIONS
471          #error exception handling support required
472       #endif
473
474       #include <algorithm>
475       #include <memory>
476
477       #define BOOST_RE_ALGO_INCLUDED
478
479       #define BOOST_RE_DISTANCE(i, j, n) do { n = 0; std::distance(i, j, n); } while(false)
480       #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
481       #define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
482       #define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
483       #define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
484       #define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
485
486       #if defined(__STL_USE_STD_ALLOCATORS) || (defined(__SGI_STL_PORT ) && !defined(__STL_MEMBER_TEMPLATE_CLASSES) && !defined(__STL_MEMBER_TEMPLATES))
487
488          /* new style allocator's with nested template classes */
489          #undef BOOST_RE_NO_MEMBER_TEMPLATES
490          #define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
491          #define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
492          #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
493          #define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
494
495       #else  /* __STL_USE_STD_ALLOCATORS */
496             #define BOOST_RE_OLD_ALLOCATORS
497             #define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
498             #define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
499             #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
500             #define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
501             #define BOOST_RE_NEED_BINDER
502             #define BOOST_RE_NEED_ALLOC
503       #endif /* __STL_USE_STD_ALLOCATORS */
504
505       #define BOOST_RE_STL_DONE
506       #ifndef __SGI_STL_PORT
507          //#define BOOST_RE_NO_NOT_EQUAL
508       #endif
509
510    #elif defined(__STD_ITERATOR__)
511
512       /* Rogue Wave STL */
513
514       #if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(RWSTD_NO_MEM_CLASS_TEMPLATES)
515          #define BOOST_RE_NO_MEMBER_TEMPLATES
516       #endif
517       #ifdef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
518          #define BOOST_RE_NO_TEMPLATE_RETURNS
519       #endif
520
521       #ifdef RWSTD_NO_EXCEPTIONS
522          #error exception handling support required
523       #endif
524
525       #ifdef RWSTD_NO_MUTABLE
526          #define BOOST_RE_NO_MUTABLE
527       #endif
528
529       #ifdef RWSTD_NO_DEFAULT_TEMPLATES
530          #define BOOST_RE_NO_DEFAULT_PARAM
531          #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
532          #define BOOST_RE_NO_STRING_DEF_ARGS  
533       #endif
534
535       #ifdef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES
536          #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
537          #define BOOST_RE_NO_STRING_DEF_ARGS  
538       #endif
539
540       #ifdef RWSTD_NO_BOOL
541          #define BOOST_RE_NO_BOOL
542       #endif
543
544       #if _RWSTD_VER > 0x020000
545          #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
546           #define BOOST_RE_DISTANCE(i, j, n) do { n = 0; std::distance(i, j, n); } while(false)
547          #else 
548           #define BOOST_RE_DISTANCE(i, j, n) (n = std::distance(i, j))
549          #endif
550          #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
551          #define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
552          #define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
553          #define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
554          #define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
555       #else 
556          #define BOOST_RE_DISTANCE(i, j, n) std::distance(i, j, n)do { n = 0; std::distance(i, j, n); } while(false)
557          #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
558          #if _RWSTD_VER >= 0x0200
559             #define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T>
560          #else
561             #define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
562          #endif
563          #define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
564          #define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
565          #define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
566       #endif
567
568       #include <memory>
569
570       #ifdef _RWSTD_ALLOCATOR
571
572          /* new style allocator */
573
574          #define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
575          #define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
576          #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
577          #define BOOST_RE_DEF_ALLOC(x)  std::allocator<x>
578
579       #else
580          /*
581          // old style allocator
582          // this varies a great deal between versions, and there is no way
583          // that I can tell of differentiating between them, so use our
584          // own default allocator...
585          */
586          #define BOOST_RE_OLD_ALLOCATORS
587          #define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
588          #define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
589          #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
590          #define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
591
592          #define BOOST_RE_NEED_BINDER
593          #define BOOST_RE_NEED_ALLOC
594
595       #endif
596
597       #define BOOST_RE_STL_DONE
598       #if _RWSTD_VER < 0x020100
599          #define BOOST_RE_NO_OI_ASSIGN
600       #endif
601
602    #elif defined (ITERATOR_H)
603
604       /* HP STL */
605
606       #define BOOST_RE_NO_LOCALE_H
607
608       #include <algo.h>
609       #define BOOST_RE_ALGO_INCLUDED
610
611       #define BOOST_RE_DISTANCE(i, j, n) std::distance(i, j, n)do { n = 0; std::distance(i, j, n); } while(false)
612       #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
613       #define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
614       #define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
615       #define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
616       #define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
617
618       /* old style allocator */
619       #define BOOST_RE_OLD_ALLOCATORS
620       #define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
621       #define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
622       #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
623       #define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
624
625       #define BOOST_RE_NEED_BINDER
626       #define BOOST_RE_NEED_ALLOC
627       #define BOOST_RE_NO_NOT_EQUAL
628
629       #define BOOST_RE_STL_DONE
630
631    #elif defined (BOOST_MSVC)
632
633       /* assume we're using MS's own STL (VC++ 5/6) */
634       #define BOOST_RE_NO_OI_ASSIGN
635
636       #define BOOST_RE_DISTANCE(i, j, n) n = std::distance(i, j)
637       #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D>
638       #define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D>
639       #define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D>
640       #define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D>
641       #define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D>
642
643       /* MS's allocators are rather ambiguous about their properties
644       at least as far as MSDN is concerned, so play safe: */
645       #define BOOST_RE_OLD_ALLOCATORS
646       #define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
647       #define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
648       #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
649       #define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
650
651       #define BOOST_RE_NEED_BINDER
652       #define BOOST_RE_NEED_ALLOC
653
654       #define BOOST_RE_STL_DONE
655       #ifndef _CPPLIB_VER
656          #define BOOST_RE_USE_FACET(l, type) std::use_facet(l, (type*)0, true)
657          #define BOOST_RE_HAS_FACET(l, type) std::has_facet(l, (type*)0)
658       #else
659          #define BOOST_RE_USE_FACET(l, type) std::use_facet(l, (type*)0)
660          #define BOOST_RE_HAS_FACET(l, type) std::has_facet(l, (type*)0)
661       #endif
662
663
664    #else
665
666       /* unknown STL version
667        try the defaults: */
668     
669       // dwa 10/05/00 Why were we assuming a broken distance in this case?
670       #define BOOST_RE_DISTANCE(i, j, n)  (n = std::distance(i, j))
671       /* these may be suspect for older libraries */
672       #define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
673       #define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
674       #define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
675       #define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
676       #define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
677
678    #endif  /* <iterator> config */
679
680 #else   /* no <iterator> at all */
681
682    #define BOOST_RE_DISTANCE(i, j, n) (n = j - i)
683    #define BOOST_RE_OUTPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
684    #define BOOST_RE_INPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
685    #define BOOST_RE_FWD_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
686    #define BOOST_RE_BIDI_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
687    #define BOOST_RE_RA_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
688
689
690 #endif
691
692 /* now do allocator if not already done */
693
694 #ifndef BOOST_RE_STL_DONE
695
696    #ifdef BOOST_RE_NO_MEMORY_H
697
698       /* old style allocator */
699       
700       #define BOOST_RE_OLD_ALLOCATORS
701
702       #define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
703       #define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
704       #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
705       #define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
706
707       #define BOOST_RE_NEED_BINDER
708       #define BOOST_RE_NEED_ALLOC
709
710    #else
711
712       /* new style allocator's with nested template classes */
713
714       #define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
715       #define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
716       #define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
717       #define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
718
719    #endif
720
721 #endif
722 #endif // BOOST_RE_AUTO_CONFIGURE
723
724
725
726 /* namespace configuration goes here: */
727 #define BOOST_RE_USING(x) using namespace x;
728
729
730 /* locale configuration goes here */
731 #if !defined(BOOST_RE_NO_LOCALE_H)
732     #include <locale>
733     #define LOCALE_INSTANCE(i) std::locale i;
734     #define MAYBE_PASS_LOCALE(i) , i
735     #ifndef BOOST_RE_NO_TEMPLATE_RETURNS
736       #ifndef BOOST_RE_USE_FACET
737          #define BOOST_RE_USE_FACET(l, type) std::use_facet< type >(l)
738       #endif
739       #ifndef BOOST_RE_HAS_FACET
740          #define BOOST_RE_HAS_FACET(l, type) std::has_facet< type >(l)
741       #endif
742     #else
743       #ifndef BOOST_RE_USE_FACET
744          #define BOOST_RE_USE_FACET(l, type) std::use_facet(l, (type*)0)
745       #endif
746       #ifndef BOOST_RE_HAS_FACET
747          #define BOOST_RE_HAS_FACET(l, type) std::has_facet(l, (type*)0)
748       #endif
749     #endif
750 #else
751     #define LOCALE_INSTANCE(i)
752     #define MAYBE_PASS_LOCALE(i)
753 #endif
754
755 /* compiler configuration goes here: */
756
757 #ifdef BOOST_RE_NO_MUTABLE
758    #define BOOST_RE_MUTABLE
759 #else
760    #define BOOST_RE_MUTABLE mutable
761 #endif
762
763 #if defined( BOOST_RE_NO_BOOL) && !defined(bool)
764    #define bool int
765    #define true 1
766    #define false 0
767 #endif
768
769 #ifndef BOOST_RE_CALL
770 #define BOOST_RE_CALL
771 #endif
772
773 #ifndef BOOST_RE_CCALL
774 #define BOOST_RE_CCALL
775 #endif
776
777 #ifndef BOOST_RE_DECL
778 #define BOOST_RE_DECL
779 #endif
780
781 #if defined(BOOST_RE_NO_DEFAULT_PARAM) || defined(BOOST_RE_NO_TRICKY_DEFAULT_PARAM)
782 #define BOOST_RE_NO_STRING_DEF_ARGS  
783 #endif
784
785
786
787 /* add our class def's if they are needed: */
788
789 namespace boost{
790    namespace re_detail{
791
792 #ifdef __BORLANDC__
793    #if __BORLANDC__ == 0x530
794     #pragma option push -a4 -b
795    #elif __BORLANDC__ > 0x530
796     #pragma option push -a8 -b
797    #endif
798 #endif
799
800 // add our destroy functions:
801
802 template <class T>
803 inline void BOOST_RE_CALL jm_destroy(T* t)
804 {
805    t->~T();
806    (void)t; // suppress incorrect MSVC compiler warning
807 }
808 #if 0
809 inline void BOOST_RE_CALL jm_destroy(char* t){}
810 inline void BOOST_RE_CALL jm_destroy(short* t){}
811 inline void BOOST_RE_CALL jm_destroy(unsigned short* t){}
812 inline void BOOST_RE_CALL jm_destroy(int* t){}
813 inline void BOOST_RE_CALL jm_destroy(unsigned int* t){}
814 inline void BOOST_RE_CALL jm_destroy(long* t){}
815 inline void BOOST_RE_CALL jm_destroy(unsigned long* t){}
816 #endif
817
818 template <class T>
819 inline void BOOST_RE_CALL jm_construct(void* p, const T& t)
820 {
821    new (p) T(t);
822 }
823
824
825 template<class T, class Allocator>
826 class re_alloc_binder : public Allocator
827 {
828 public:
829    typedef T         value_type;
830    typedef T*        pointer;
831    typedef const T*  const_pointer;
832    typedef T&        reference;
833    typedef const T&  const_reference;
834    typedef std::size_t    size_type;
835    typedef std::ptrdiff_t difference_type;
836
837    re_alloc_binder(const Allocator& i);
838    re_alloc_binder(const re_alloc_binder& o) : Allocator(o) {}
839
840    T* BOOST_RE_CALL allocate(std::size_t n, std::size_t /* hint */ = 0)
841       { return 0 == n ? 0 : (T*) this->Allocator::allocate(n * sizeof(T)); }
842    void BOOST_RE_CALL deallocate(T *p, std::size_t n)
843              { if (0 != n) this->Allocator::deallocate((char*)p, n * sizeof (T)); }
844
845    pointer BOOST_RE_CALL address(reference x) const { return &x; }
846    const_pointer BOOST_RE_CALL address(const_reference x) const { return &x; }
847    static size_type BOOST_RE_CALL max_size() { return (size_type)-1; }
848    static void BOOST_RE_CALL construct(pointer p, const T& val) { jm_construct(p, val); }
849    void BOOST_RE_CALL destroy(pointer p) { jm_destroy(p); }
850
851    const Allocator& BOOST_RE_CALL instance()const { return *this; }
852
853 #ifndef BOOST_RE_NO_MEMBER_TEMPLATES
854
855    template <class U>
856    struct rebind
857    {
858       typedef re_alloc_binder<U, Allocator> other;
859    };
860    
861    template <class U>
862    BOOST_RE_CALL re_alloc_binder(const re_alloc_binder<U, Allocator>& o) throw()
863       : Allocator(o.instance())
864    {
865    }
866 #endif
867 };
868
869 template<class T, class Allocator>
870 inline re_alloc_binder<T, Allocator>::re_alloc_binder(const Allocator &i)
871     : Allocator(i)
872 {}
873
874
875 //
876 // class jm_def_alloc
877 // basically a standard allocator that only allocates bytes...
878 // think of it as allocator<char>, with a non-standard 
879 // rebind::other typedef.
880 //
881 class jm_def_alloc
882 {
883 public:
884    typedef char         value_type;
885    typedef char*        pointer;
886    typedef const char*  const_pointer;
887    typedef char&        reference;
888    typedef const char&  const_reference;
889    typedef std::size_t    size_type;
890    typedef std::ptrdiff_t difference_type;
891
892    pointer BOOST_RE_CALL address(reference x) const { return &x; }
893    const_pointer BOOST_RE_CALL address(const_reference x) const { return &x; }
894    static size_type BOOST_RE_CALL max_size() { return (size_type)-1; }
895    static void BOOST_RE_CALL construct(pointer , const char& ) {  }
896    void BOOST_RE_CALL destroy(pointer ) {  }
897    static void * BOOST_RE_CALL allocate(std::size_t n, std::size_t /* hint */ = 0)
898    {
899       return ::operator new(n);
900    }
901    static void BOOST_RE_CALL deallocate(void *p, std::size_t /*n*/ )
902    {
903       ::operator delete(p);
904    }
905
906 #ifndef BOOST_RE_NO_MEMBER_TEMPLATES
907    template <class U>
908    struct rebind
909    {
910       typedef re_alloc_binder<U, jm_def_alloc> other;
911    };
912
913    template <class U>
914    BOOST_RE_CALL jm_def_alloc(const re_alloc_binder<U, jm_def_alloc>& ) throw() { }
915 #endif
916    jm_def_alloc(const jm_def_alloc&) {}
917    jm_def_alloc() {}
918 };
919
920 template <class T>
921 struct dummy_iterator_base
922 {
923    typedef T                       value_type;
924    typedef std::ptrdiff_t    difference_type;
925    typedef T*                      pointer;
926    typedef T&                      reference;
927    //typedef Category              iterator_category;
928 };
929
930 // we need to absolutely sure that int values are correctly
931 // translated to bool (true or false) values...
932 // note that the original HP STL redefines the bool type regardless
933 // of whether the compiler supports it.... yuk
934
935 #if defined(BOOST_RE_NO_BOOL) || defined(ITERATOR_H) || defined(bool)
936 #define BOOST_RE_MAKE_BOOL(x) boost::re_detail::boolify(x)
937
938 template <class I>
939 inline bool BOOST_RE_CALL boolify(I val)
940 {
941    return val ? true : false;
942 }
943
944 #else
945 #define BOOST_RE_MAKE_BOOL(x) x
946 #endif
947
948 #ifdef __BORLANDC__
949  #if __BORLANDC__ > 0x520
950   #pragma option pop
951  #endif
952 #endif
953
954 } // namespace re_detail
955 #ifdef BOOST_RE_NEED_BINDER
956 using re_detail::re_alloc_binder;
957 #endif
958 #ifdef BOOST_RE_NEED_ALLOC
959 using re_detail::jm_def_alloc;
960 #endif
961 } // namespace boost
962
963 #ifdef __GNUC__
964 #define INLINE_EXCEPTION_BUG
965 #endif
966
967 #if !defined(INLINE_EXCEPTION_BUG) || defined(BOOST_RE_NO_TEMPLATE_MERGE)
968     #define CONSTRUCTOR_INLINE inline
969 #else
970     #define CONSTRUCTOR_INLINE
971 #endif
972
973 #if defined(BOOST_RE_PLATFORM_W32) && !defined(BOOST_RE_LOCALE_W32) && !defined(BOOST_RE_LOCALE_C) && !defined(BOOST_RE_LOCALE_CPP) && !defined(BOOST_RE_NO_W32)
974 #define BOOST_RE_LOCALE_W32
975 #endif
976
977 #if !defined(BOOST_RE_LOCALE_W32) && !defined(BOOST_RE_LOCALE_C) && !defined(BOOST_RE_LOCALE_CPP)
978 #define BOOST_RE_LOCALE_C
979 #endif
980
981 #if defined(BOOST_RE_OLD_ALLOCATORS)
982 #define BOOST_RE_MAYBE_TYPENAME
983 #else
984 #define BOOST_RE_MAYBE_TYPENAME typename
985 #endif
986
987 #if defined(_WIN32) && !defined(BOOST_RE_NO_W32)
988 #include <windows.h>
989 #endif
990
991
992 /* now do debugging stuff: */
993
994 #ifdef BOOST_RE_DEBUG
995
996 #ifdef BOOST_RE_OLD_IOSTREAM
997 #include <iostream.h>
998 #else
999 #include <iostream>
1000 using std::cout;
1001 using std::cin;
1002 using std::cerr;
1003 using std::endl;
1004 using std::hex;
1005 using std::dec;
1006 #endif
1007
1008    #ifndef jm_assert
1009       #define jm_assert(x) if((x) == 0){ cerr << "Assertion failed: " << #x << " in file " << __FILE__ << "and line " << __LINE__ << endl; exit(-1); }
1010    #endif
1011    #ifndef jm_trace
1012       #define jm_trace(x) cerr << x << endl;
1013    #endif
1014    #ifndef jm_instrument 
1015       #define jm_instrument jm_trace(__FILE__<<"#"<<__LINE__)
1016    #endif
1017
1018 namespace boost{
1019    namespace re_detail{
1020 class debug_guard
1021 {
1022 public:
1023    char g1[32];
1024    const char* pc;
1025    char* pnc;
1026    const char* file;
1027    int line;
1028    char g2[32];
1029    debug_guard(const char* f, int l, const char* p1 = 0, char* p2 = 0);
1030    ~debug_guard();
1031 };
1032
1033 #define BOOST_RE_GUARD_STACK boost::re_detail::debug_guard sg(__FILE__, __LINE__);
1034 #define BOOST_RE_GUARD_GLOBAL(x) const char g1##x[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, }; char g2##x[32]; boost::debug_guard g3##x(__FILE__, __LINE__, g1##x, g2##x);
1035
1036    } // namespace re_detail
1037 } // namespace boost
1038
1039    #ifdef __BORLANDC__
1040       #pragma message "macro allocator: " BOOST_RE_DEF_ALLOC_PARAM(wchar_t)
1041       #pragma message "macro jm_input_iterator: " BOOST_RE_INPUT_ITERATOR(char, std::ptrdiff_t)
1042       #pragma message "macro jm_output_iterator: " BOOST_RE_OUTPUT_ITERATOR(char, std::ptrdiff_t)
1043       #pragma message "macro jm_fwd_iterator: " BOOST_RE_FWD_ITERATOR(char, std::ptrdiff_t)
1044       #pragma message "macro jm_bidi_iterator: " BOOST_RE_BIDI_ITERATOR(char, std::ptrdiff_t)
1045       #pragma message "macro jm_ra_iterator: " BOOST_RE_RA_ITERATOR(char, std::ptrdiff_t)
1046       #ifdef BOOST_RE_LOCALE_CPP
1047          #pragma message "locale support enabled"
1048       #endif
1049    #endif
1050
1051 #else
1052
1053    #define jm_assert(x)
1054    #define jm_trace(x)
1055    #define BOOST_RE_GUARD_STACK
1056    #define BOOST_RE_GUARD_GLOBAL(x)
1057    #ifndef jm_instrument 
1058       #define jm_instrument
1059    #endif
1060
1061
1062 #endif
1063
1064 //
1065 // compiler fixes:
1066
1067 // fix for namespace problems:
1068 //
1069 // the following are defined as macros which are
1070 // incompatable with std::something syntax, no
1071 // choice but to undef them?
1072 #ifdef memcpy
1073 #undef memcpy
1074 #endif
1075 #ifdef memmove
1076 #undef memmove
1077 #endif
1078 #ifdef memset
1079 #undef memset
1080 #endif
1081 #ifdef sprintf
1082 #undef sprintf
1083 #endif
1084 #ifdef strcat
1085 #undef strcat
1086 #endif
1087 #ifdef strcmp
1088 #undef strcmp
1089 #endif
1090 #ifdef strcpy
1091 #undef strcpy
1092 #endif
1093 #ifdef strlen
1094 #undef strlen
1095 #endif
1096 #ifdef swprintf
1097 #undef swprintf
1098 #endif
1099 #ifdef wcslen
1100 #undef wcslen
1101 #endif
1102 #ifdef wcscpy
1103 #undef wcscpy
1104 #endif
1105 #ifdef wcscmp
1106 #undef wcscmp
1107 #endif
1108 #ifdef isalpha
1109 #undef isalpha
1110 #endif
1111 #ifdef iscntrl
1112 #undef iscntrl
1113 #endif
1114 #ifdef isdigit
1115 #undef isdigit
1116 #endif
1117 #ifdef islower
1118 #undef islower
1119 #endif
1120 #ifdef isupper
1121 #undef isupper
1122 #endif
1123 #ifdef ispunct
1124 #undef ispunct
1125 #endif
1126 #ifdef isspace
1127 #undef isspace
1128 #endif
1129 #ifdef isxdigit
1130 #undef isxdigit
1131 #endif
1132
1133 #ifdef tolower
1134 #undef tolower
1135 #endif
1136 #ifdef iswalpha
1137 #undef iswalpha
1138 #endif
1139 #ifdef iswcntrl
1140 #undef iswcntrl
1141 #endif
1142 #ifdef iswdigit
1143 #undef iswdigit
1144 #endif
1145 #ifdef iswlower
1146 #undef iswlower
1147 #endif
1148 #ifdef iswpunct
1149 #undef iswpunct
1150 #endif
1151 #ifdef iswspace
1152 #undef iswspace
1153 #endif
1154 #ifdef iswupper
1155 #undef iswupper
1156 #endif
1157 #ifdef iswxdigit
1158 #undef iswxdigit
1159 #endif
1160 #ifdef towlower
1161 #undef towlower
1162 #endif
1163 #ifdef wcsxfrm
1164 #undef wcsxfrm
1165 #endif
1166
1167 #if defined(BOOST_NO_STDC_NAMESPACE) || (defined(std) && defined(__SGI_STL_PORT))
1168 //
1169 // fix namespaces,
1170 // note that we almost always do this for STLPort, as it doesn't always
1171 // catch all the wide character functions:
1172 namespace std{
1173    using ::ptrdiff_t;
1174    using ::size_t;
1175    using ::memcpy;
1176    using ::memmove;
1177    using ::memset;
1178    using ::memcmp;
1179    using ::sprintf;
1180    using ::strcat;
1181    using ::strcmp;
1182    using ::strcpy;
1183    using ::strlen;
1184    using ::strxfrm;
1185    using ::isalpha;
1186    using ::iscntrl;
1187    using ::isdigit;
1188    using ::islower;
1189    using ::isupper;
1190    using ::ispunct;
1191    using ::isspace;
1192    using ::isxdigit;
1193    using ::tolower;
1194    using ::abs;
1195    using ::setlocale;
1196 #ifndef BOOST_RE_NO_WCSTRING
1197 #ifndef BOOST_RE_NO_SWPRINTF
1198    using ::swprintf;
1199 #endif
1200    using ::wcslen;
1201    using ::wcscpy;
1202    using ::wcscmp;
1203    using ::iswalpha;
1204    using ::iswcntrl;
1205    using ::iswdigit;
1206    using ::iswlower;
1207    using ::iswpunct;
1208    using ::iswspace;
1209    using ::iswupper;
1210    using ::iswxdigit;
1211    using ::towlower;
1212    using ::wcsxfrm;
1213    using ::wcstombs;
1214    using ::mbstowcs;
1215 #if !defined(BOOST_RE_NO_LOCALE_H) && !defined (__STL_NO_NATIVE_MBSTATE_T)
1216    using ::mbstate_t;
1217 #endif
1218    using ::fseek;
1219    using ::fread;
1220    using ::ftell;
1221    using ::fopen;
1222    using ::fclose;
1223    using ::FILE;
1224 #endif // BOOST_RE_NO_WCSTRING
1225 }
1226
1227 #endif
1228
1229 #if defined(__SGI_STL_PORT) && defined(BOOST_MSVC) && !defined(_MT) && (__SGI_STL_PORT >= 0x400)
1230 #error STLPort libraries require multithread support to be turned on.
1231 #endif
1232
1233
1234 #endif  /* __cplusplus */
1235
1236 #ifndef BOOST_RE_CALL
1237 #define BOOST_RE_CALL
1238 #endif
1239
1240 #ifndef BOOST_RE_CCALL
1241 #define BOOST_RE_CCALL
1242 #endif
1243
1244 #ifndef BOOST_RE_DECL
1245 #define BOOST_RE_DECL
1246 #endif
1247
1248
1249 #endif  // BOOST_REGEX_CONFIG_HPP
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294