32#ifndef _RWSTD_RW_DEFS_H_INCLUDED
33#define _RWSTD_RW_DEFS_H_INCLUDED
35#ifndef _RWSTD_RW_CONFIG_H_INCLUDED
44#ifndef _RWSTD_NO_NEW_HEADER
46# define _RWSTD_CASSERT <cassert>
47# define _RWSTD_CCTYPE <cctype>
48# define _RWSTD_CERRNO <cerrno>
49# define _RWSTD_CFLOAT <cfloat>
50# define _RWSTD_CISO646 <ciso646>
51# define _RWSTD_CLIMITS <climits>
52# define _RWSTD_CLOCALE <clocale>
53# define _RWSTD_CMATH <cmath>
54# define _RWSTD_CSETJMP <csetjmp>
55# define _RWSTD_CSIGNAL <csignal>
57# ifdef _RWSTD_EDG_ECCP
60# define _RWSTD_CSTDARG <ansi/cstdarg>
62# define _RWSTD_CSTDARG <cstdarg>
65# define _RWSTD_CSTDDEF <cstddef>
66# define _RWSTD_CSTDIO <cstdio>
67# define _RWSTD_CSTDLIB <cstdlib>
68# define _RWSTD_CSTRING <cstring>
69# define _RWSTD_CTIME <ctime>
71# ifndef _RWSTD_NO_WCHAR_H
72# define _RWSTD_CWCHAR <cwchar>
74# define _RWSTD_CWCHAR <rw/_defs.h>
77# ifndef _RWSTD_NO_WCTYPE_H
78# define _RWSTD_CWCTYPE <cwctype>
80# define _RWSTD_CWCTYPE <rw/_defs.h>
85# define _RWSTD_CASSERT "assert.h"
86# define _RWSTD_CCTYPE <ctype.h>
87# define _RWSTD_CERRNO "errno.h"
88# define _RWSTD_CFLOAT <float.h>
89# define _RWSTD_CISO646 <iso646.h>
90# define _RWSTD_CLIMITS <limits.h>
91# define _RWSTD_CLOCALE <locale.h>
92# define _RWSTD_CMATH <math.h>
93# define _RWSTD_CSETJMP "setjmp.h"
94# define _RWSTD_CSIGNAL <signal.h>
95# define _RWSTD_CSTDARG <stdarg.h>
96# define _RWSTD_CSTDDEF <stddef.h>
97# define _RWSTD_CSTDIO <stdio.h>
98# define _RWSTD_CSTDLIB <stdlib.h>
99# define _RWSTD_CSTRING <string.h>
100# define _RWSTD_CTIME <time.h>
102# ifndef _RWSTD_NO_WCHAR_H
103# define _RWSTD_CWCHAR <wchar.h>
105# define _RWSTD_CWCHAR <rw/_defs.h>
108# ifndef _RWSTD_NO_WCTYPE_H
109# define _RWSTD_CWCTYPE <wctype.h>
111# define _RWSTD_CWCTYPE <rw/_defs.h>
118# define _RWSTD_SYS_TYPES_H <basetsd.h>
120# define _RWSTD_SYS_TYPES_H <rw/_defs.h>
122# define _RWSTD_SYS_TYPES_H <sys/types.h>
128# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
131# define _RWSTD_ANSI_C_ASSERT_H "../include/crt/assert.h"
133# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
134# define _RWSTD_ANSI_C_CTYPE_H <../include/crt/ctype.h>
136# if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)
139# define _RWSTD_ANSI_C_ERRNO_H "../include/crt/errno.h"
141# if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)
142# define _RWSTD_ANSI_C_FLOAT_H <../include/crt/float.h>
144# if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)
145# define _RWSTD_ANSI_C_ISO646_H <../include/crt/iso646.h>
148# if !defined (_RWSTD_ANSI_C_LIMITS_H)
149# if !defined (_RWSTD_NO_LIMITS_H)
150# define _RWSTD_ANSI_C_LIMITS_H <../include/crt/limits.h>
152# define _RWSTD_ANSI_C_LIMITS_H <rw/_defs.h>
156# if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)
157# define _RWSTD_ANSI_C_LOCALE_H <../include/crt/locale.h>
159# if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)
160# define _RWSTD_ANSI_C_MATH_H <../include/crt/math.h>
162# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
165# define _RWSTD_ANSI_C_SETJMP_H "../include/crt/setjmp.h"
167# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
168# define _RWSTD_ANSI_C_SIGNAL_H <../include/crt/signal.h>
170# if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)
171# define _RWSTD_ANSI_C_STDARG_H <../include/crt/stdarg.h>
173# if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)
174# define _RWSTD_ANSI_C_STDDEF_H <../include/crt/stddef.h>
176# if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)
177# define _RWSTD_ANSI_C_STDIO_H <../include/crt/stdio.h>
179# if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)
180# define _RWSTD_ANSI_C_STDLIB_H <../include/crt/stdlib.h>
182# if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)
183# define _RWSTD_ANSI_C_STRING_H <../include/crt/string.h>
185# if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)
186# define _RWSTD_ANSI_C_TIME_H <../include/crt/time.h>
188# if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)
189# define _RWSTD_ANSI_C_WCHAR_H <../include/crt/wchar.h>
192# if !defined (_RWSTD_ANSI_C_WCTYPE_H)
193# if !defined (_RWSTD_NO_WCTYPE_H)
194# define _RWSTD_ANSI_C_WCTYPE_H <../include/crt/wctype.h>
196# define _RWSTD_ANSI_C_WCTYPE_H <rw/_defs.h>
200#elif !defined (_RWSTD_NO_FORCE_RELATIVE_PATHS)
202# undef _RWSTD_ANSI_C_ASSERT_H
205# define _RWSTD_ANSI_C_ASSERT_H "../include/assert.h"
206# undef _RWSTD_ANSI_C_CTYPE_H
207# define _RWSTD_ANSI_C_CTYPE_H <../include/ctype.h>
208# undef _RWSTD_ANSI_C_ERRNO_H
211# define _RWSTD_ANSI_C_ERRNO_H "../include/errno.h"
212# undef _RWSTD_ANSI_C_FLOAT_H
213# define _RWSTD_ANSI_C_FLOAT_H <../include/float.h>
214# undef _RWSTD_ANSI_C_ISO646_H
215# define _RWSTD_ANSI_C_ISO646_H <../include/iso646.h>
217# undef _RWSTD_ANSI_C_LIMITS_H
218# ifndef _RWSTD_ANSI_C_LIMITS_H
219# define _RWSTD_ANSI_C_LIMITS_H <../include/limits.h>
221# define _RWSTD_ANSI_C_LIMITS_H <rw/_defs.h>
224# undef _RWSTD_ANSI_C_LOCALE_H
225# define _RWSTD_ANSI_C_LOCALE_H <../include/locale.h>
226# undef _RWSTD_ANSI_C_MATH_H
227# define _RWSTD_ANSI_C_MATH_H <../include/math.h>
228# undef _RWSTD_ANSI_C_SETJMP_H
231# define _RWSTD_ANSI_C_SETJMP_H "../include/setjmp.h"
232# undef _RWSTD_ANSI_C_SIGNAL_H
233# define _RWSTD_ANSI_C_SIGNAL_H <../include/signal.h>
234# undef _RWSTD_ANSI_C_STDARG_H
235# define _RWSTD_ANSI_C_STDARG_H <../include/stdarg.h>
236# undef _RWSTD_ANSI_C_STDDEF_H
237# define _RWSTD_ANSI_C_STDDEF_H <../include/stddef.h>
238# undef _RWSTD_ANSI_C_STDIO_H
239# define _RWSTD_ANSI_C_STDIO_H <../include/stdio.h>
240# undef _RWSTD_ANSI_C_STDLIB_H
241# define _RWSTD_ANSI_C_STDLIB_H <../include/stdlib.h>
242# undef _RWSTD_ANSI_C_STRING_H
243# define _RWSTD_ANSI_C_STRING_H <../include/string.h>
244# undef _RWSTD_ANSI_C_TIME_H
245# define _RWSTD_ANSI_C_TIME_H <../include/time.h>
247# undef _RWSTD_ANSI_C_WCHAR_H
248# ifndef _RWSTD_NO_WCHAR_H
249# define _RWSTD_ANSI_C_WCHAR_H <../include/wchar.h>
251# define _RWSTD_ANSI_C_WCHAR_H <rw/_defs.h>
254# undef _RWSTD_ANSI_C_WCTYPE_H
255# ifndef _RWSTD_NO_WCTYPE_H
256# define _RWSTD_ANSI_C_WCTYPE_H <../include/wctype.h>
258# define _RWSTD_ANSI_C_WCTYPE_H <rw/_defs.h>
261#elif defined (_RWSTD_USE_USR_INCLUDE_HEADERS)
263# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
266# define _RWSTD_ANSI_C_ASSERT_H "/usr/include/assert.h"
268# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
269# define _RWSTD_ANSI_C_CTYPE_H </usr/include/ctype.h>
271# if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)
274# define _RWSTD_ANSI_C_ERRNO_H "/usr/include/errno.h"
276# if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)
277# define _RWSTD_ANSI_C_FLOAT_H </usr/include/float.h>
279# if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)
280# define _RWSTD_ANSI_C_ISO646_H </usr/include/iso646.h>
283# if !defined (_RWSTD_ANSI_C_LIMITS_H)
284# if !defined (_RWSTD_NO_LIMITS_H)
285# define _RWSTD_ANSI_C_LIMITS_H </usr/include/limits.h>
287# define _RWSTD_ANSI_C_LIMITS_H <rw/_defs.h>
291# if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)
292# define _RWSTD_ANSI_C_LOCALE_H </usr/include/locale.h>
294# if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)
295# define _RWSTD_ANSI_C_MATH_H </usr/include/math.h>
297# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
300# define _RWSTD_ANSI_C_SETJMP_H "/usr/include/setjmp.h"
302# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
303# define _RWSTD_ANSI_C_SIGNAL_H </usr/include/signal.h>
305# if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)
306# define _RWSTD_ANSI_C_STDARG_H </usr/include/stdarg.h>
308# if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)
309# define _RWSTD_ANSI_C_STDDEF_H </usr/include/stddef.h>
311# if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)
312# define _RWSTD_ANSI_C_STDIO_H </usr/include/stdio.h>
314# if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)
315# define _RWSTD_ANSI_C_STDLIB_H </usr/include/stdlib.h>
317# if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)
318# define _RWSTD_ANSI_C_STRING_H </usr/include/string.h>
320# if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)
321# define _RWSTD_ANSI_C_TIME_H </usr/include/time.h>
323# if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)
324# define _RWSTD_ANSI_C_WCHAR_H </usr/include/wchar.h>
327# if !defined (_RWSTD_ANSI_C_WCTYPE_H)
328# if !defined (_RWSTD_NO_WCTYPE_H)
329# define _RWSTD_ANSI_C_WCTYPE_H </usr/include/wctype.h>
331# define _RWSTD_ANSI_C_WCTYPE_H <rw/_defs.h>
337# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
340# define _RWSTD_ANSI_C_ASSERT_H "../include/assert.h"
342# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
343# define _RWSTD_ANSI_C_CTYPE_H <../include/ctype.h>
345# if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)
348# define _RWSTD_ANSI_C_ERRNO_H "../include/errno.h"
350# if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)
351# define _RWSTD_ANSI_C_FLOAT_H <../include/float.h>
353# if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)
354# define _RWSTD_ANSI_C_ISO646_H <../include/iso646.h>
357# if !defined (_RWSTD_ANSI_C_LIMITS_H)
358# if !defined (_RWSTD_NO_LIMITS_H)
359# define _RWSTD_ANSI_C_LIMITS_H <../include/limits.h>
361# define _RWSTD_ANSI_C_LIMITS_H <rw/_defs.h>
365# if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)
366# define _RWSTD_ANSI_C_LOCALE_H <../include/locale.h>
368# if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)
369# define _RWSTD_ANSI_C_MATH_H <../include/math.h>
371# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
374# define _RWSTD_ANSI_C_SETJMP_H "../include/setjmp.h"
376# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
377# define _RWSTD_ANSI_C_SIGNAL_H <../include/signal.h>
379# if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)
380# define _RWSTD_ANSI_C_STDARG_H <../include/stdarg.h>
382# if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)
383# define _RWSTD_ANSI_C_STDDEF_H <../include/stddef.h>
385# if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)
386# define _RWSTD_ANSI_C_STDIO_H <../include/stdio.h>
388# if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)
389# define _RWSTD_ANSI_C_STDLIB_H <../include/stdlib.h>
391# if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)
392# define _RWSTD_ANSI_C_STRING_H <../include/string.h>
394# if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)
395# define _RWSTD_ANSI_C_TIME_H <../include/time.h>
397# if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)
398# define _RWSTD_ANSI_C_WCHAR_H <../include/wchar.h>
401# if !defined (_RWSTD_ANSI_C_WCTYPE_H)
402# if !defined (_RWSTD_NO_WCTYPE_H)
403# define _RWSTD_ANSI_C_WCTYPE_H <../include/wctype.h>
405# define _RWSTD_ANSI_C_WCTYPE_H <rw/_defs.h>
434#if !defined (_RWSTD_RATIO_DIVIDER)
435# define _RWSTD_RATIO_DIVIDER 1000U
438#if !defined(_RWSTD_MINIMUM_NEW_CAPACITY)
439# define _RWSTD_MINIMUM_NEW_CAPACITY 32U
442#if !defined(_RWSTD_NEW_CAPACITY_RATIO)
445# define _RWSTD_NEW_CAPACITY_RATIO 1618U
448#if !defined(_RWSTD_MINIMUM_STRING_CAPACITY)
449# define _RWSTD_MINIMUM_STRING_CAPACITY 128U
452#if !defined(_RWSTD_STRING_CAPACITY_RATIO)
453# define _RWSTD_STRING_CAPACITY_RATIO 1618U
456#if !defined (_RWSTD_MINIMUM_STRINGBUF_CAPACITY)
457# define _RWSTD_MINIMUM_STRINGBUF_CAPACITY 512
461#if !defined (__HP_aCC)
462# define _RWSTD_NEW_CAPACITY(ignore, what, from) \
463 _RW::__rw_new_capacity (from, what)
465# define _RWSTD_NEW_CAPACITY(T, what, from) \
466 _RW::__rw_new_capacity<T>(from, what)
473#if defined (_MSC_VER) && (defined (RWDLL) || defined (_RWSHARED))
475# ifdef _RWSTD_LIB_SRC
476# define _RWSTD_EXPORT __declspec (dllexport)
478# define _RWSTD_EXPORT __declspec (dllimport)
481# define _RWSTD_CLASS_EXPORT _RWSTD_EXPORT
482# define _RWSTD_MEMBER_EXPORT
485# define _RWSTD_EXPORT
486# define _RWSTD_CLASS_EXPORT
487# define _RWSTD_MEMBER_EXPORT
497#ifndef _RWSTD_NO_EXPORT
498# define _EXPORT export
504#ifndef _RWSTD_NO_MUTABLE
505# define _MUTABLE mutable
515#ifndef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS
516# define _RWSTD_DEFAULT_ARG(n) = n
518# define _RWSTD_DEFAULT_ARG(n)
524#if !defined (_MSC_VER) || _MSC_VER < 1300
525# define _RWSTD_REDECLARED_DEFAULT(arg) = arg
527# define _RWSTD_REDECLARED_DEFAULT(ignore)
533#ifndef _RWSTD_NO_STATIC_CAST
534# define _RWSTD_STATIC_CAST(T, x) static_cast< T >(x)
535# define _RWSTD_REINTERPRET_CAST(T, x) reinterpret_cast< T >(x)
536# define _RWSTD_CONST_CAST(T, x) const_cast< T >(x)
538# define _RWSTD_STATIC_CAST(T, x) ((T)x)
539# define _RWSTD_REINTERPRET_CAST(T, x) ((T)x)
540# define _RWSTD_CONST_CAST(T, x) ((T)x)
543#ifndef _RWSTD_NO_DYNAMIC_CAST
544# define _RWSTD_DYNAMIC_CAST(T, x) dynamic_cast< T >(x)
546# define _RWSTD_DYNAMIC_CAST(T, x) ((T)x)
553#ifdef _RWSTD_NO_NEW_FUNC_TEMPLATE_SYNTAX
554# define _RWSTD_SPECIALIZED_FUNCTION
556# define _RWSTD_SPECIALIZED_FUNCTION template<>
559#ifdef _RWSTD_NO_NEW_CLASS_TEMPLATE_SYNTAX
560# define _RWSTD_SPECIALIZED_CLASS
562# define _RWSTD_SPECIALIZED_CLASS template<>
566#ifndef _RWSTD_NO_NAMESPACE
567# define _RWSTD_NAMESPACE(name) namespace name
568# define _USING(name) using name
575# define _RWSTD_NAMESPACE(ignore) extern "C++"
576# define _USING(ignore) typedef void __rw_unused_type
587#ifdef _RWSTD_NO_SPECIALIZED_FRIEND
589# define _RWSTD_SPECIALIZED_FRIEND(name) (_STD::name)
591# define _RWSTD_SPECIALIZED_FRIEND(name) name
595# define _RWSTD_SPECIALIZED_FRIEND(name) (_STD::name)
600# define _RWSTD_SPECIALIZED_FRIEND(name) name <>
609#ifndef _RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES
610# define _RWSTD_ALLOCATOR
614#define _RWSTD_MB_CUR_MAX 16
617#define _RWSTD_DO_PASTE(a, b) a ## b
618#define _RWSTD_PASTE(a, b) _RWSTD_DO_PASTE (a, b)
620#ifdef _RWSTD_REENTRANT
622# define _RWSTD_MT_GUARD(mutex) \
623 _RW::__rw_guard _RWSTD_PASTE (__guard, __LINE__) (mutex)
626# define _RWSTD_MT_STATIC_GUARD(type) \
627 typedef _RW::__rw_type<type,__LINE__> _UniqueType; \
628 _RWSTD_MT_CLASS_GUARD(_UniqueType)
631# define _RWSTD_MT_CLASS_GUARD(type) \
632 _RWSTD_MT_GUARD (_RW::__rw_get_static_mutex ((type*)0))
634# define _RWSTD_ATOMIC_PREINCREMENT(x, mutex) \
635 _RW::__rw_atomic_preincrement (x, mutex)
637# define _RWSTD_ATOMIC_PREDECREMENT(x, mutex) \
638 _RW::__rw_atomic_predecrement (x, mutex)
640# define _RWSTD_ATOMIC_SWAP(x, y, mutex) \
641 _RW::__rw_atomic_exchange (x, y, mutex)
643# ifndef _RWSTD_NO_EXT_REENTRANT_IO
645# define _RWSTD_ATOMIC_IO_SWAP(x, y, mutex) \
646 ((this->flags () & _RWSTD_IOS_NOLOCK) ? \
647 _RW::__rw_ordinary_exchange (x, y) \
648 : _RW::__rw_atomic_exchange (x, y, mutex))
651# define _RWSTD_ATOMIC_IO_SWAP(x, y, mutex) \
652 _RWSTD_ATOMIC_SWAP(x, y, mutex)
655# if defined (_PA_RISC2_0)
657# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \
658 _RW::__rw_string_atomic_preincrement (x, mutex)
660# define _RWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \
661 _RW::__rw_string_atomic_predecrement (x, mutex)
663# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \
664 _RW::__rw_string_atomic_exchange (x, y, mutex)
667# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \
668 _RWSTD_ATOMIC_PREINCREMENT (x, mutex)
669# define _RWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \
670 _RWSTD_ATOMIC_PREDECREMENT (x, mutex)
671# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \
672 _RWSTD_ATOMIC_SWAP (x, y, mutex)
676# ifndef _RWSTD_NO_TLS
677# ifndef _RWSTD_THREAD
681# define _RWSTD_THREAD __thread
684# define _RWSTD_THREAD_PREINCREMENT(x, ignore) \
686# define _RWSTD_THREAD_PREDECREMENT(x, ignore) \
688# define _RWSTD_THREAD_SWAP(x, y, ignore) \
689 _RW::__rw_ordinary_exchange (x, y)
695# define _RWSTD_MT_GUARD(ignore) ((void)0)
696# define _RWSTD_MT_STATIC_GUARD(name) _RWSTD_MT_GUARD (name)
697# define _RWSTD_MT_CLASS_GUARD(type) _RWSTD_MT_GUARD (type)
699# define _RWSTD_ATOMIC_PREINCREMENT(x, ignore) ++(x)
700# define _RWSTD_ATOMIC_PREDECREMENT(x, ignore) --(x)
701# define _RWSTD_ATOMIC_SWAP(x, y, ignore) \
702 _RW::__rw_atomic_exchange ((x), (y), false)
704# define _RWSTD_ATOMIC_IO_SWAP(x, y, ignore) \
705 _RW::__rw_ordinary_exchange ((x), (y))
707# define _RWSTD_STRING_ATOMIC_PREINCREMENT(x, mutex) \
708 _RWSTD_ATOMIC_PREINCREMENT(x, mutex)
709# define _RWSTD_STRING_ATOMIC_PREDECREMENT(x, mutex) \
710 _RWSTD_ATOMIC_PREDECREMENT(x, mutex)
711# define _RWSTD_STRING_ATOMIC_SWAP(x, y, mutex) \
712 _RWSTD_ATOMIC_SWAP(x, y, mutex)
718# define _RWSTD_THREAD
722#ifndef _RWSTD_THREAD_PREINCREMENT
723# define _RWSTD_THREAD_PREINCREMENT(x, mutex) \
724 _RWSTD_ATOMIC_PREINCREMENT (x, mutex)
727#ifndef _RWSTD_THREAD_PREDECREMENT
728# define _RWSTD_THREAD_PREDECREMENT(x, mutex) \
729 _RWSTD_ATOMIC_PREDECREMENT (x, mutex)
732#ifndef _RWSTD_THREAD_SWAP
733# define _RWSTD_THREAD_SWAP(x, y, ignore) \
734 _RWSTD_ATOMIC_SWAP (x, y, mutex)
738#ifndef _RWSTD_NO_LIBC_IN_STD
739# ifndef _RWSTD_NO_NAMESPACE
748#define _RWSTD_INVALID_FILE_DESC -1
749#define _RWSTD_INVALID_FILE_PTR 0
751#ifndef _RWSTD_NO_NATIVE_IO
752# define _RWSTD_INVALID_FILE -1
753# define _RWSTD_INVALID_OPENMODE -1
755# define _RWSTD_INVALID_FILE (FILE*)0
756# define _RWSTD_INVALID_OPENMODE 0
761#define _RWSTD_STREAMOFF _RWSTD_PTRDIFF_T
762#define _RWSTD_STREAMSIZE _RWSTD_PTRDIFF_T
766#define _RWSTD_IOS_BOOLALPHA 0x00001
767#define _RWSTD_IOS_DEC 0x00002
768#define _RWSTD_IOS_FIXED 0x00004
769#define _RWSTD_IOS_HEX 0x00008
770#define _RWSTD_IOS_INTERNAL 0x00010
771#define _RWSTD_IOS_LEFT 0x00020
772#define _RWSTD_IOS_OCT 0x00040
773#define _RWSTD_IOS_RIGHT 0x00080
774#define _RWSTD_IOS_SCIENTIFIC 0x00100
775#define _RWSTD_IOS_SHOWBASE 0x00200
776#define _RWSTD_IOS_SHOWPOINT 0x00400
777#define _RWSTD_IOS_SHOWPOS 0x00800
778#define _RWSTD_IOS_SKIPWS 0x01000
779#define _RWSTD_IOS_UNITBUF 0x02000
780#define _RWSTD_IOS_UPPERCASE 0x04000
781#define _RWSTD_IOS_BIN 0x08000
784#define _RWSTD_IOS_NOLOCK 0x10000
785#define _RWSTD_IOS_NOLOCKBUF 0x20000
788#define _RWSTD_IOS_SYNC_STDIO 0x40000
790#define _RWSTD_IOS_FLOATFIELD (_RWSTD_IOS_FIXED | _RWSTD_IOS_SCIENTIFIC)
792#define _RWSTD_IOS_ADJUSTFIELD \
793 (_RWSTD_IOS_LEFT | _RWSTD_IOS_RIGHT | _RWSTD_IOS_INTERNAL)
795#ifndef _RWSTD_NO_EXT_BIN_IO
796# define _RWSTD_IOS_BASEFIELD \
797 (_RWSTD_IOS_DEC | _RWSTD_IOS_HEX | _RWSTD_IOS_OCT | _RWSTD_IOS_BIN)
799# define _RWSTD_IOS_BASEFIELD \
800 (_RWSTD_IOS_DEC | _RWSTD_IOS_HEX | _RWSTD_IOS_OCT)
804#define _RWSTD_IOS_BASEMASK 63
805#define _RWSTD_IOS_BASEOFF 26
807#define _RWSTD_IOS_GOODBIT 0x00
808#define _RWSTD_IOS_BADBIT 0x01
809#define _RWSTD_IOS_EOFBIT 0x02
810#define _RWSTD_IOS_FAILBIT 0x04
811#define _RWSTD_IOS_NOTHROW 0x08
812#define _RWSTD_IOS_RETHROW 0x10
815#define _RWSTD_IOS_APP 0x01
816#define _RWSTD_IOS_BINARY 0x02
817#define _RWSTD_IOS_IN 0x04
818#define _RWSTD_IOS_OUT 0x08
819#define _RWSTD_IOS_TRUNC 0x10
820#define _RWSTD_IOS_ATE 0x20
821#define _RWSTD_IOS_NOCREATE 0x40
822#define _RWSTD_IOS_NOREPLACE 0x80
823#define _RWSTD_IOS_STDIO 0x100
824#define _RWSTD_IOS_NATIVE 0x200
826#define _RWSTD_IOS_OPENMODE_MASK \
827 ( _RWSTD_IOS_APP | _RWSTD_IOS_BINARY \
828 | _RWSTD_IOS_IN | _RWSTD_IOS_OUT \
829 | _RWSTD_IOS_TRUNC | _RWSTD_IOS_ATE \
830 | _RWSTD_IOS_NOCREATE | _RWSTD_IOS_NOREPLACE \
831 | _RWSTD_IOS_STDIO | _RWSTD_IOS_NATIVE)
833#if !defined (_RWSTD_NO_STATIC_IOSTREAM_INIT) \
834 && !defined (_RWSTD_NO_IOSTREAM_OBJECT_REFS)
836# define _RWSTD_IOSTREAM_OBJECT(name) &name
842# define _RWSTD_IOSTREAM_OBJECT(name) name
849#ifndef _RWSTD_NO_EXCEPTIONS
851# define _CATCH(ex) catch (ex)
852# define _THROW(ex) throw ex
853# define _RETHROW throw
856# define _CATCH(ignore) while (0)
857# define _THROW(ignore) ((void)0)
858# define _RETHROW ((void)0)
882#ifdef _RWSTD_ALLOCATOR
883# ifndef _RWSTD_NO_DEPENDENT_TEMPLATE
884# define _RWSTD_REBIND(from, to) \
885 typename from::template rebind < to >::other
887# define _RWSTD_REBIND(from, to) \
888 typename from:: rebind < to >::other
891# define _RWSTD_ALLOC_TYPE(Allocator, ignore) \
893# define _RWSTD_VALUE_ALLOC(ignore, object, call) \
894 (object).allocator_type::call
895# define _RWSTD_VALUE_ALLOC_CAST(rvalue) \
896 _RWSTD_STATIC_CAST (allocator_type&, rvalue)
898# define _RWSTD_REBIND(from, to) \
899 _STD::allocator_interface < from, to >
900# define _RWSTD_ALLOC_TYPE(Allocator, T) \
901 _RWSTD_REBIND (Allocator, T)
902# define _RWSTD_VALUE_ALLOC(Allocator, object, call) \
903 Allocator (object).call
904# define _RWSTD_VALUE_ALLOC_CAST(rvalue) \
905 _C_value_alloc_type (rvalue)
915#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
917# define _STD_HAS_FACET(type, arg) _STD::has_facet < type >(arg)
918# define _HAS_FACET(type, arg) has_facet < type >(arg)
920# define _STD_USE_FACET(type, arg) _STD::use_facet < type >(arg)
921# define _USE_FACET(type, arg) use_facet < type >(arg)
923# define _GET_TEMP_BUFFER(type, size) get_temporary_buffer < type >(size)
926# define _STD_HAS_FACET(type, arg) _STD::has_facet (arg, (type*)(0))
927# define _HAS_FACET(type, arg) has_facet (arg, (type*)(0))
929# define _STD_USE_FACET(type, arg) _STD::use_facet (arg, (type*)(0))
930# define _USE_FACET(type, arg) use_facet (arg, (type*)(0))
932# define _GET_TEMP_BUFFER(type, size) get_temporary_buffer (size, (type*)0)
936#if defined (__GNUG__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 97 \
937 && defined (_RWSTD_NO_HONOR_STD)
939# undef _STD_HAS_FACET
940# define _STD_HAS_FACET(type, arg) _HAS_FACET (type, arg)
942# undef _STD_USE_FACET
943# define _STD_USE_FACET(type, arg) _USE_FACET (type, arg)
947#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
948# ifndef _RWSTD_NO_HONOR_STD
949# define _RWSTD_USE_FACET(type, arg) _STD::use_facet< type >(arg)
951# define _RWSTD_USE_FACET(type, arg) use_facet< type >(arg)
954# ifndef _RWSTD_NO_HONOR_STD
955# define _RWSTD_USE_FACET(type, arg) _STD::use_facet(arg, (type*)(0))
957# define _RWSTD_USE_FACET(type, arg) use_facet(arg, (type*)(0))
962#ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN
965# define _RWSTD_OPERATOR_ARROW(signature) signature { return &**this; }
967# define _RWSTD_OPERATOR_ARROW(ignore)
972#define _RWSTD_UNUSED(arg) ((void)&arg)
978#ifndef _RWSTD_DEFINE_EXTERNS
979# define _RWSTD_EXTERN(decl, ignore) extern decl
981# define _RWSTD_EXTERN(decl, value) extern decl = value
988#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT
989# define _RWSTD_STATIC_CONST(type, init) static const type init
990# ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
991# define _RWSTD_DEFINE_STATIC_CONST(decl) decl
997# define _RWSTD_DEFINE_STATIC_CONST(ignore)
1000# define _RWSTD_STATIC_CONST(ignore, init) enum { init }
1001# define _RWSTD_DEFINE_STATIC_CONST(ignore)
1004#ifndef _RWSTD_NO_STATICS_IN_TEMPLATE
1005# define _RWSTD_INTERNAL static
1009# define _RWSTD_INTERNAL
1014#ifndef _RWSTD_NO_WCSFTIME
1017# ifndef _RWSTD_NO_WCSFTIME_WCHAR_T_FMAT
1018# define _RWSTD_FMT_TYPE(arg) const wchar_t* arg
1019# define _RWSTD_FMT_ASSGN(str) L##str
1021# define _RWSTD_FMT_TYPE(arg) const char* arg
1022# define _RWSTD_FMT_ASSGN(str) str
1025# define _RWSTD_FMT_TYPE(arg) const char* arg
1026# define _RWSTD_FMT_ASSGN(str) str
1032#define _RWSTD_ITERATOR_TYPES(_Iterator) \
1033 typedef typename _Iterator::difference_type difference_type; \
1034 typedef typename _Iterator::value_type value_type; \
1035 typedef typename _Iterator::pointer pointer; \
1036 typedef typename _Iterator::reference reference; \
1037 typedef typename _Iterator::iterator_category iterator_category
1040#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
1042# define _RWSTD_VALUE_TYPE(iterT) \
1043 (typename _STD::iterator_traits< iterT >::value_type*)0
1044# define _RWSTD_DIFFERENCE_TYPE(iterT) \
1045 (typename _STD::iterator_traits< iterT >::difference_type*)0
1047# if defined (SNI) || defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x530
1050# define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \
1051 (const typename _STD::iterator_traits< iterT >::iterator_category&) \
1052 (_STD::forward_iterator_tag ())
1055# define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \
1056 typename _STD::iterator_traits< iterT >::iterator_category ()
1059# define _RWSTD_REVERSE_ITERATOR(iterT, ign1, ign2, ign3) \
1060 _STD::reverse_iterator<iterT>
1064# define _RWSTD_VALUE_TYPE(iterT) __value_type ((iterT*)0)
1066# define _RWSTD_DIFFERENCE_TYPE(iterT) \
1067 _STD::__distance_type (iterT ())
1071# define _RWSTD_ITERATOR_CATEGORY(ignore, iter) \
1072 _STD::__iterator_category (iter)
1074# define _RWSTD_REVERSE_ITERATOR(iterT, Ref, Ptr, Tag) \
1075 _STD::reverse_iterator<iterT, _STD::Tag, value_type, \
1076 Ref, Ptr, difference_type>
1085#if defined (_RWSTDDEBUG)
1086# ifndef _RWSTD_NO_PRETTY_FUNCTION
1088# define _RWSTD_ASSERT(expr) \
1089 ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, \
1090 __PRETTY_FUNCTION__))
1091# elif !defined (_RWSTD_NO_FUNC)
1093# define _RWSTD_ASSERT(expr) \
1094 ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, \
1096# elif defined (__FUNCSIG__)
1098# define _RWSTD_ASSERT(expr) \
1099 ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, \
1102# define _RWSTD_ASSERT(expr) \
1103 ((expr) ? (void)0 : _RW::__rw_assert_fail (#expr, __FILE__, __LINE__, 0))
1105#elif defined (_RWSTD_ASSUME)
1106# define _RWSTD_ASSERT(expr) _RWSTD_ASSUME (expr)
1108# define _RWSTD_ASSERT(ignore) ((void)0)
1111#ifndef _RWSTD_ASSUME
1113# define _RWSTD_ASSUME(expr) _RWSTD_ASSERT (expr)
1116#define _RWSTD_STR(x) #x
1117#define _RWSTD_STRSTR(x) _RWSTD_STR(x)
1119#ifndef _RWSTD_NO_PRETTY_FUNCTION
1120# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __PRETTY_FUNCTION__
1121#elif !defined (_RWSTD_NO_FUNC)
1122# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __func__
1123#elif defined (__FUNCSIG__)
1124# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __FUNCSIG__
1126# define _RWSTD_FUNC(name) _RWSTD_FILE_LINE, name
1129#define _RWSTD_FILE_LINE __FILE__ ":" _RWSTD_STRSTR (__LINE__)
1131#if !defined (__DECCXX_VER) || __DECCXX_VER > 60290024
1132# define _RWSTD_REQUIRES(pred, args) (pred) ? (void)0 : _RW::__rw_throw args
1135# define _RWSTD_REQUIRES(pred, args) if (pred) ; else _RW::__rw_throw args
1140#if !defined (_RWSTD_NO_EXCEPTIONS) \
1141 && !defined (_RWSTD_NO_EXCEPTION_SPECIFICATION)
1144# define _THROWS(type_id_list) throw type_id_list
1146# define _THROWS(ignore)
1151#ifndef _RWSTD_NO_LIBC_EXCEPTION_SPEC
1152# define _LIBC_THROWS() throw ()
1154# define _LIBC_THROWS()
1159#ifndef _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW
1160# define _NEW_THROWS(args) _THROWS (args)
1162# define _NEW_THROWS(ignore)
1166#ifndef _RWSTD_ATTRIBUTE_NORETURN
1168# define _RWSTD_ATTRIBUTE_NORETURN
1172#ifdef _RWSTD_ATTRIBUTE_NOTHROW
1174# define _RWSTD_DECLARE_NOTHROW _RWSTD_ATTRIBUTE_NOTHROW
1176# define _RWSTD_DEFINE_NOTHROW
1179# define _RWSTD_ATTRIBUTE_NOTHROW
1182# define _RWSTD_DECLARE_NOTHROW _THROWS(())
1183# define _RWSTD_DEFINE_NOTHROW _THROWS(())
1197struct __rw_compile_assert;
1200struct __rw_compile_assert<
true> {
enum { _C_ok }; };
1202#define _RWSTD_COMPILE_ASSERT(const_expr) \
1203 ((void)_RW::__rw_compile_assert<(const_expr)>::_C_ok)
1207__rw_assert_fail (
const char*,
const char*,
int,
const char*)
1214# pragma does_not_return (__rw_assert_fail)
1223#if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \
1224 && (!defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540)
1225# define _DISTANCE(first, last, ignore) _STD::distance (first, last)
1228# define _DISTANCE(first, last, type) _RW::__rw_distance (first, last, type())
1234#if defined(_RWSTDDEBUG) && !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \
1235 && !defined (_RWSTD_NO_DEBUG_ITER) && !defined (SNI)
1236# define _RWSTD_ASSERT_RANGE(first, last) \
1237 _RWSTD_ASSERT (_RW::__rw_valid_range (first, last))
1238# define _RWSTD_ASSERT_IN_RANGE(it, first, last) \
1239 _RWSTD_ASSERT (_RW::__rw_in_range (it, first, last))
1240# define _RWSTD_ASSERT_DEREF(it) \
1241 _RWSTD_ASSERT (_RW::__rw_dereferenceable (it))
1243# ifndef _RWSTD_NO_DEBUG_ITER
1244# define _RWSTD_NO_DEBUG_ITER
1247# define _RWSTD_ASSERT_RANGE(ign1, ign2) ((void)0)
1248# define _RWSTD_ASSERT_IN_RANGE(ign1, ign2, ign3) ((void)0)
1249# define _RWSTD_ASSERT_DEREF(ignore) ((void)0)
1254#ifndef _RWSTD_NO_DEBUG_ITER
1255# define _ITER_BASE(it) ((it).base ())
1257# define _ITER_BASE(it) (it)
1263#ifndef _RWSTD_WINT_T
1266# define _RWSTD_WINT_T int
1272#define _RWSTD_INT_T int
1276#ifndef _RWSTD_SSIZE_T
1278# define _RWSTD_SSIZE_T SSIZE_T
1280# define _RWSTD_SSIZE_T long
1285#ifndef _RWSTD_UWCHAR_INT_T
1286# if _RWSTD_CHAR_SIZE == _RWSTD_WCHAR_SIZE
1287# define _RWSTD_UWCHAR_INT_T unsigned char
1288# elif _RWSTD_SHRT_SIZE == _RWSTD_WCHAR_SIZE
1289# define _RWSTD_UWCHAR_INT_T unsigned short
1290# elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE
1291# define _RWSTD_UWCHAR_INT_T unsigned int
1293# define _RWSTD_UWCHAR_INT_T _RWSTD_SIZE_T
1299# define _RWSTD_USING_SNI(name) _USING(__SNI::name)
1300# if defined(_RWSTD_STRICT_ANSI)
1301# define fileno(p) (int) ((p)->_file)
1304# define _RWSTD_USING_SNI(ignore) typedef void __rw_unused_type
1308#ifndef _RWSTD_TMPBUF_SIZE
1309# define _RWSTD_TMPBUF_SIZE 4096
1312#ifndef _RWSTD_NO_STRTOLL
1313# define _STRTOLL strtoll
1316# define _STRTOLL (_RWSTD_LONG_LONG)strtol
1320#ifndef _RWSTD_NO_STRTOULL
1321# define _STRTOULL strtoull
1324# define _STRTOULL (unsigned _RWSTD_LONG_LONG)strtoul
1328#ifdef _RWSTD_LIB_SRC
1329# define _RWSTD_TI_EXPORT
1331# define _RWSTD_TI_EXPORT _RWSTD_EXPORT
1335#if defined (_RWSTD_INSTANTIATE_TEMPLATES) \
1336 && !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
1337 && !defined (_RWSTD_NO_INSTANTIATE)
1339# define _RWSTD_INSTANTIATE(name, type) \
1340 ( _RWSTD_INSTANTIATE ## name \
1341 && _RWSTD_INSTANTIATE ## type \
1342 && !_RWSTD_NO ## type)
1344# define _RWSTD_INSTANTIATE_1(arg) template arg
1345# define _RWSTD_INSTANTIATE_2(a1, a2) template a1, a2
1346# define _RWSTD_INSTANTIATE_3(a1, a2, a3) template a1, a2, a3
1348# undef _RWSTD_TI_EXPORT
1349# define _RWSTD_TI_EXPORT _RWSTD_EXPORT
1351# ifdef _RWSTD_NO_FUNCTION_EXPLICIT_INSTANTIATION
1354# define _RWSTD_INSTANTIATE_FUN_1(ignore) \
1355 typedef void __rw_unused_type
1356# define _RWSTD_INSTANTIATE_FUN_2(ign1, ign2) \
1357 typedef void __rw_unused_type
1358# define _RWSTD_INSTANTIATE_FUN_3(ign1, ign2, ign3) \
1359 typedef void __rw_unused_type
1361#elif defined (_MSC_VER) \
1362 && !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
1363 && !defined (_RWSTD_NO_INSTANTIATE)
1365# define _RWSTD_INSTANTIATE(ign1, type) (!_RWSTD_NO ## type)
1366# define _RWSTD_INSTANTIATE_1(arg) extern template arg
1367# define _RWSTD_INSTANTIATE_2(a1, a2) extern template a1, a2
1368# define _RWSTD_INSTANTIATE_3(a1, a2, a3) extern template a1, a2, a3
1369#elif !defined (_RWSTD_NO_EXTERN_TEMPLATE)
1373# define _RWSTD_INSTANTIATE(ign1, type) (!_RWSTD_NO ## type)
1374# define _RWSTD_INSTANTIATE_1(arg) extern template arg
1375# define _RWSTD_INSTANTIATE_2(a1, a2) extern template a1, a2
1376# define _RWSTD_INSTANTIATE_3(a1, a2, a3) extern template a1, a2, a3
1378# ifndef _RWSTD_NO_FUNCTION_EXPLICIT_INSTANTIATION
1379# ifdef _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
1384# define _RWSTD_INSTANTIATE_FUN_1(arg) template<> arg
1385# define _RWSTD_INSTANTIATE_FUN_2(a1, a2) template<> a1, a2
1386# define _RWSTD_INSTANTIATE_FUN_3(a1, a2, a3) template<> a1, a2, a3
1394# define _RWSTD_INSTANTIATE_FUN_1(ignore) \
1395 typedef void __rw_unused_type
1396# define _RWSTD_INSTANTIATE_FUN_2(ign1, ign2) \
1397 typedef void __rw_unused_type
1398# define _RWSTD_INSTANTIATE_FUN_3(ign1, ign2, ign3) \
1399 typedef void __rw_unused_type
1402# define _RWSTD_INSTANTIATE(ign1, ign2) 0
1403# define _RWSTD_INSTANTIATE_1(ignore) typedef void __rw_unused_type
1404# define _RWSTD_INSTANTIATE_2(ign1, ign2) typedef void __rw_unused_type
1405# define _RWSTD_INSTANTIATE_3(ign1, ign2, ign3) typedef void __rw_unused_type
1408#ifndef _RWSTD_INSTANTIATE_FUN_1
1410# define _RWSTD_INSTANTIATE_FUN_1(arg) _RWSTD_INSTANTIATE_1 (arg)
1411# define _RWSTD_INSTANTIATE_FUN_2(a1, a2) _RWSTD_INSTANTIATE_2 (a1, a2)
1412# define _RWSTD_INSTANTIATE_FUN_3(a1, a2, a3) _RWSTD_INSTANTIATE_3 (a1, a2, a3)
1416#ifndef _RWSTD_NO_STD_UNCAUGHT_EXCEPTION
1418# define _UNCAUGHT_EXCEPTION() _STD::uncaught_exception()
1419#elif !defined (_RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION)
1421# define _UNCAUGHT_EXCEPTION() uncaught_exception()
1424# define _UNCAUGHT_EXCEPTION() true
1428#ifdef _RWSTD_NO_EXTERN_TEMPLATE_BEFORE_DEFINITION
1429# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1430# define _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1438#if defined _RWSTD_NO_IMPLICIT_INCLUSION \
1439 && ( !defined (_RWSTD_NO_TEMPLATE_DEFINITIONS) \
1440 || defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
1441 || defined (_RWSTD_NO_IMPLICIT_INSTANTIATION) \
1442 || defined (_RWSTD_NO_INSTANTIATE))
1444# ifndef _RWSTD_LIB_SRC
1448# define _RWSTD_DEFINE_TEMPLATE(name) !_RWSTD_NO ## name ## _DEFINITION
1454# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1459# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1460# define _RWSTD_DEFINE_TEMPLATE_LAST(name) \
1461 !_RWSTD_NO ## name ## _DEFINITION
1463# define _RWSTD_DEFINE_TEMPLATE_FIRST(name) \
1464 !_RWSTD_NO ## name ## _DEFINITION
1465# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1467# elif !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION) \
1468 && !defined (_RWSTD_NO_IMPLICIT_INSTANTIATION) \
1469 && !defined (_RWSTD_NO_EXPLICIT_INSTANTIATION_WITH_IMPLICIT_INCLUSION)
1474# define _RWSTD_DEFINE_TEMPLATE(name) _RWSTD_INSTANTIATE ## name
1475# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1476# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1477# define _RWSTD_DEFINE_TEMPLATE_LAST(name) _RWSTD_INSTANTIATE ## name
1479# define _RWSTD_DEFINE_TEMPLATE_FIRST(name) _RWSTD_INSTANTIATE ## name
1480# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1487# define _RWSTD_DEFINE_TEMPLATE(ignore) 1
1488# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1489# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1490# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 1
1492# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 1
1493# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1497# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_WITH_IMPLICIT_INCLUSION
1503# define _RWSTD_DEFINE_TEMPLATE(ignore) 0
1504# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1505# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1507# ifndef _RWSTD_LIB_SRC
1508# define _RWSTD_DEFINE_TEMPLATE(ignore) 0
1509# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1510# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1512# define _RWSTD_DEFINE_TEMPLATE(name) _RWSTD_INSTANTIATE ## name
1513# ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION_BEFORE_DEFINITION
1514# define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
1515# define _RWSTD_DEFINE_TEMPLATE_LAST(name) _RWSTD_INSTANTIATE ## name
1517# define _RWSTD_DEFINE_TEMPLATE_FIRST(name) _RWSTD_INSTANTIATE ## name
1518# define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
1527#if !defined (_RWSTD_NO_WCTRANS_T)
1528# if defined (_RWSTD_NO_WCTRANS) && defined (_RWSTD_NO_TOWCTRANS)
1529# define _RWSTD_NO_WCTRANS_T
1534#ifndef _RWSTD_NO_SPECIALIZATION_ON_RETURN_TYPE
1535# define _RWSTD_DUMMY_ARG(ignore)
1537# ifndef _RWSTD_NO_DUMMY_DEFAULT_ARG
1542# define _RWSTD_DUMMY_ARG(T) , T
1544# define _RWSTD_DUMMY_ARG(ignore)
1549#define _RWSTD_ISTREAMBUF_ITER(T) \
1550 _STD::istreambuf_iterator<T, _STD::char_traits<T > >
1552#define _RWSTD_OSTREAMBUF_ITER(T) \
1553 _STD::ostreambuf_iterator<T, _STD::char_traits<T > >
1566#ifdef _RWSTD_NO_EXTERN_TEMPLATE
1567# ifdef _RWSTD_NO_EXPLICIT_MEMBER_SPECIALIZATION
1568# ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
1569# define _RWSTD_NO_SPECIALIZED_FACET_ID
1576# ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
1577# define _RWSTD_NO_SPECIALIZED_FACET_ID
1584# define _RWSTD_ASSIGN_RANGE(first, last, tag) \
1585 _C_assign_range (first, last, tag)
1586# define _RWSTD_INSERT_RANGE(it, first, last, tag) \
1587 _C_insert_range (it, first, last, tag)
1592# define _RWSTD_VA_COPY(va_dst, va_src) \
1593 __builtin_va_copy (va_dst, va_src)
1594#elif defined (va_copy) || !defined _RWSTD_NO_VA_COPY
1597# define _RWSTD_VA_COPY(va_dst, va_src) \
1598 va_copy (va_dst, va_src)
1599#elif defined (_RWSTD_NO_VA_LIST_ARRAY)
1601# define _RWSTD_VA_COPY(va_dst, va_src) \
1605# define _RWSTD_VA_COPY(va_dst, va_src) \
1606 memcpy (va_dst, va_src, sizeof (va_list))
1612#if !defined (_RWSTD_TT_ALIGN_OF) \
1613 || !defined (_RWSTD_TT_ALIGNED_POD) \
1614 || !defined (_RWSTD_TT_MAX_ALIGNMENT)
1615# ifndef _RWSTD_NO_ALIGN_TRAITS
1616# define _RWSTD_NO_ALIGN_TRAITS
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_DECLARE_NOTHROW
#define _RWSTD_SPECIALIZED_CLASS
#define _RWSTD_ATTRIBUTE_NORETURN