4 * Hewlett-Packard Company
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. Hewlett-Packard Company makes no
11 * representations about the suitability of this software for any
12 * purpose. It is provided "as is" without express or implied warranty.
17 * Permission to use, copy, modify, distribute and sell this software
18 * and its documentation for any purpose is hereby granted without fee,
19 * provided that the above copyright notice appear in all copies and
20 * that both that copyright notice and this permission notice appear
21 * in supporting documentation. Silicon Graphics makes no
22 * representations about the suitability of this software for any
23 * purpose. It is provided "as is" without express or implied warranty.
27 #ifndef __STL_CONFIG_H
28 # define __STL_CONFIG_H
30 // What this file does.
31 // (1) Defines bool, true, and false if the compiler doesn't do so already.
32 // (2) Defines __STL_NO_DRAND48 if the compiler's standard library does
33 // not support the drand48() function.
34 // (3) Defines __STL_STATIC_TEMPLATE_MEMBER_BUG if the compiler can't
35 // handle static members of template classes.
36 // (4) Defines 'typename' as a null macro if the compiler does not support
37 // the typename keyword.
38 // (5) Defines __STL_CLASS_PARTIAL_SPECIALIZATION if the compiler
39 // supports partial specialization of template classes.
40 // (6) Defines __STL_MEMBER_TEMPLATES if the compiler supports
41 // template members of classes.
42 // (7) Defines 'explicit' as a null macro if the compiler does not support
43 // the explicit keyword.
44 // (8) Defines __STL_LIMITED_DEFAULT_TEMPLATES if the compiler is
45 // unable to handle default template parameters that depend on
46 // previous template parameters.
47 // (9) Defines __STL_NON_TYPE_TMPL_PARAM_BUG if the compiler has
48 // trouble performing function template argument deduction for
49 // non-type template parameters.
50 // (10) Defines __STL_USE_EXCEPTIONS if the compiler (in the current
51 // compilation mode) supports exceptions.
52 // (11) Defines __STL_SGI_THREADS if this is being compiled on an SGI
53 // compiler, and if the user hasn't selected pthreads or no threads
55 // (12) Defines __STL_WIN32THREADS if this is being compiled on a
56 // WIN32 compiler in multithreaded mode.
57 // (13) Defines __stl_assert either as a test or as a null macro,
58 // depending on whether or not __STL_ASSERTIONS is defined.
60 # if defined(__sgi) && !defined(__GNUC__)
62 # define __STL_NEED_BOOL
64 # if !defined(_TYPENAME_IS_KEYWORD)
65 # define __STL_NEED_TYPENAME
67 # ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
68 # define __STL_CLASS_PARTIAL_SPECIALIZATION
70 # ifdef _MEMBER_TEMPLATES
71 # define __STL_MEMBER_TEMPLATES
73 # if !defined(_EXPLICIT_IS_KEYWORD)
74 # define __STL_NEED_EXPLICIT
77 # define __STL_USE_EXCEPTIONS
79 # if !defined(_NOTHREADS) && !defined(_PTHREADS)
80 # define __STL_SGI_THREADS
85 # if 0 && (__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8))
86 # define __STL_STATIC_TEMPLATE_MEMBER_BUG
87 # define __STL_NEED_TYPENAME
88 # define __STL_NEED_EXPLICIT
90 # define __STL_CLASS_PARTIAL_SPECIALIZATION
93 # define __STL_USE_EXCEPTIONS
97 # if defined(__SUNPRO_CC)
98 # define __STL_NEED_BOOL
99 # define __STL_NEED_TYPENAME
100 # define __STL_NEED_EXPLICIT
101 # define __STL_USE_EXCEPTIONS
104 # if defined(__COMO__)
105 # define __STL_MEMBER_TEMPLATES
106 # define __STL_CLASS_PARTIAL_SPECIALIZATION
107 # define __STL_USE_EXCEPTIONS
110 # if defined(_MSC_VER)
114 # define __STL_NEED_BOOL
116 # define __STL_NO_DRAND48
117 # define __STL_NEED_TYPENAME
119 # define __STL_NEED_EXPLICIT
121 # define __STL_NON_TYPE_TMPL_PARAM_BUG
123 # define __STL_USE_EXCEPTIONS
126 # define __STL_WIN32THREADS
130 # if defined(__BORLANDC__)
131 # define __STL_NO_DRAND48
132 # define __STL_NEED_TYPENAME
133 # define __STL_LIMITED_DEFAULT_TEMPLATES
134 # define __STL_NON_TYPE_TMPL_PARAM_BUG
136 # define __STL_USE_EXCEPTIONS
139 # define __STL_WIN32THREADS
144 # if defined(__STL_NEED_BOOL)
148 # undef __STL_NEED_BOOL
151 # ifdef __STL_NEED_TYPENAME
153 # undef __STL_NEED_TYPENAME
156 # ifdef __STL_NEED_EXPLICIT
158 # undef __STL_NEED_EXPLICIT
161 #ifdef __STL_ASSERTIONS
163 # define __stl_assert(expr) \
164 if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \
165 __FILE__, __LINE__, # expr); abort(); }
167 # define __stl_assert(expr)
170 #endif /* __STL_CONFIG_H */