1 //  (C) Copyright John Maddock 2001 - 2003.
2 //  (C) Copyright Darin Adler 2001 - 2002.
3 //  (C) Copyright Jens Maurer 2001 - 2002.
4 //  (C) Copyright Beman Dawes 2001 - 2003.
5 //  (C) Copyright Douglas Gregor 2002.
6 //  (C) Copyright David Abrahams 2002 - 2003.
7 //  (C) Copyright Synge Todo 2003.
8 //  Use, modification and distribution are subject to the
9 //  Boost Software License, Version 1.0. (See accompanying file
10 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 
12 //  See http://www.boost.org for most recent version.
13 
14 //  GNU C++ compiler setup:
15 
16 #if __GNUC__ < 3
17 #   if __GNUC_MINOR__ == 91
18        // egcs 1.1 won't parse shared_ptr.hpp without this:
19 #      define BOOST_NO_AUTO_PTR
20 #   endif
21 #   if __GNUC_MINOR__ < 95
22       //
23       // Prior to gcc 2.95 member templates only partly
24       // work - define BOOST_MSVC6_MEMBER_TEMPLATES
25       // instead since inline member templates mostly work.
26       //
27 #     define BOOST_NO_MEMBER_TEMPLATES
28 #     if __GNUC_MINOR__ >= 9
29 #       define BOOST_MSVC6_MEMBER_TEMPLATES
30 #     endif
31 #   endif
32 
33 #   if __GNUC_MINOR__ < 96
34 #     define BOOST_NO_SFINAE
35 #   endif
36 
37 #   if __GNUC_MINOR__ <= 97
38 #     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
39 #     define BOOST_NO_OPERATORS_IN_NAMESPACE
40 #   endif
41 
42 #   define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
43 #   define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
44 #   define BOOST_NO_IS_ABSTRACT
45 #   define BOOST_NO_CXX11_EXTERN_TEMPLATE
46 // Variadic macros do not exist for gcc versions before 3.0
47 #   define BOOST_NO_CXX11_VARIADIC_MACROS
48 #elif __GNUC__ == 3
49 #  if defined (__PATHSCALE__)
50 #     define BOOST_NO_TWO_PHASE_NAME_LOOKUP
51 #     define BOOST_NO_IS_ABSTRACT
52 #  endif
53    //
54    // gcc-3.x problems:
55    //
56    // Bug specific to gcc 3.1 and 3.2:
57    //
58 #  if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))
59 #     define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
60 #  endif
61 #  if __GNUC_MINOR__ < 4
62 #     define BOOST_NO_IS_ABSTRACT
63 #  endif
64 #  define BOOST_NO_CXX11_EXTERN_TEMPLATE
65 #endif
66 #if __GNUC__ < 4
67 //
68 // All problems to gcc-3.x and earlier here:
69 //
70 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
71 #  ifdef __OPEN64__
72 #     define BOOST_NO_IS_ABSTRACT
73 #  endif
74 #endif
75 
76 #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
77 // Previous versions of GCC did not completely implement value-initialization:
78 // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
79 // members", reported by Jonathan Wakely in 2006,
80 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
81 // GCC Bug 33916, "Default constructor fails to initialize array members",
82 // reported by Michael Elizabeth Chastain in 2007,
83 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
84 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
85 #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
86 #endif
87 
88 #if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
89 # define BOOST_NO_EXCEPTIONS
90 #endif
91 
92 
93 //
94 // Threading support: Turn this on unconditionally here (except for
95 // those platforms where we can know for sure). It will get turned off again
96 // later if no threading API is detected.
97 //
98 #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
99 # define BOOST_HAS_THREADS
100 #endif
101 
102 //
103 // gcc has "long long"
104 //
105 #define BOOST_HAS_LONG_LONG
106 
107 //
108 // gcc implements the named return value optimization since version 3.1
109 //
110 #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
111 #define BOOST_HAS_NRVO
112 #endif
113 
114 //
115 // Dynamic shared object (DSO) and dynamic-link library (DLL) support
116 //
117 #if __GNUC__ >= 4
118 #  if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
119      // All Win32 development environments, including 64-bit Windows and MinGW, define
120      // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
121      // so does not define _WIN32 or its variants.
122 #    define BOOST_HAS_DECLSPEC
123 #    define BOOST_SYMBOL_EXPORT __attribute__((dllexport))
124 #    define BOOST_SYMBOL_IMPORT __attribute__((dllimport))
125 #  else
126 #    define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
127 #    define BOOST_SYMBOL_IMPORT
128 #  endif
129 #  define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
130 #else
131 // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
132 #  define BOOST_SYMBOL_EXPORT
133 #endif
134 
135 //
136 // RTTI and typeinfo detection is possible post gcc-4.3:
137 //
138 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
139 #  ifndef __GXX_RTTI
140 #     ifndef BOOST_NO_TYPEID
141 #        define BOOST_NO_TYPEID
142 #     endif
143 #     ifndef BOOST_NO_RTTI
144 #        define BOOST_NO_RTTI
145 #     endif
146 #  endif
147 #endif
148 
149 
150 // C++0x features in 4.3.n and later
151 //
152 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
153 // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
154 // passed on the command line, which in turn defines
155 // __GXX_EXPERIMENTAL_CXX0X__.
156 #  define BOOST_HAS_DECLTYPE
157 #  define BOOST_HAS_RVALUE_REFS
158 #  define BOOST_HAS_STATIC_ASSERT
159 #  define BOOST_HAS_VARIADIC_TMPL
160 #else
161 #  define BOOST_NO_CXX11_DECLTYPE
162 #  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
163 #  define BOOST_NO_CXX11_RVALUE_REFERENCES
164 #  define BOOST_NO_CXX11_STATIC_ASSERT
165 
166 // Variadic templates compiler:
167 //   http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
168 #  if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
169 #    define BOOST_HAS_VARIADIC_TMPL
170 #  else
171 #    define BOOST_NO_CXX11_VARIADIC_TEMPLATES
172 #  endif
173 #endif
174 
175 // C++0x features in 4.4.n and later
176 //
177 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
178 #  define BOOST_NO_CXX11_AUTO_DECLARATIONS
179 #  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
180 #  define BOOST_NO_CXX11_CHAR16_T
181 #  define BOOST_NO_CXX11_CHAR32_T
182 #  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
183 #  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
184 #  define BOOST_NO_CXX11_DELETED_FUNCTIONS
185 #endif
186 
187 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
188 #  define BOOST_NO_SFINAE_EXPR
189 #endif
190 
191 // C++0x features in 4.5.0 and later
192 //
193 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
194 #  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
195 #  define BOOST_NO_CXX11_LAMBDAS
196 #  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
197 #  define BOOST_NO_CXX11_RAW_LITERALS
198 #  define BOOST_NO_CXX11_UNICODE_LITERALS
199 #endif
200 
201 // C++0x features in 4.5.1 and later
202 //
203 #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
204 // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
205 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
206 #  define BOOST_NO_CXX11_SCOPED_ENUMS
207 #endif
208 
209 // C++0x features in 4.6.n and later
210 //
211 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
212 #define BOOST_NO_CXX11_CONSTEXPR
213 #define BOOST_NO_CXX11_NOEXCEPT
214 #define BOOST_NO_CXX11_NULLPTR
215 #define BOOST_NO_CXX11_RANGE_BASED_FOR
216 #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
217 #endif
218 
219 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
220 #  define BOOST_NO_CXX11_TEMPLATE_ALIASES
221 #endif
222 // C++0x features not supported at all yet
223 //
224 #define BOOST_NO_CXX11_DECLTYPE_N3276
225 
226 #ifndef BOOST_COMPILER
227 #  define BOOST_COMPILER "GNU C++ version " __VERSION__
228 #endif
229 
230 // ConceptGCC compiler:
231 //   http://www.generic-programming.org/software/ConceptGCC/
232 #ifdef __GXX_CONCEPTS__
233 #  define BOOST_HAS_CONCEPTS
234 #  define BOOST_COMPILER "ConceptGCC version " __VERSION__
235 #endif
236 
237 // versions check:
238 // we don't know gcc prior to version 2.90:
239 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
240 #  error "Compiler not configured - please reconfigure"
241 #endif
242 //
243 // last known and checked version is 4.6 (Pre-release):
244 #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))
245 #  if defined(BOOST_ASSERT_CONFIG)
246 #     error "Unknown compiler version - please run the configure tests and report the results"
247 #  else
248 // we don't emit warnings here anymore since there are no defect macros defined for
249 // gcc post 3.4, so any failures are gcc regressions...
250 //#     warning "Unknown compiler version - please run the configure tests and report the results"
251 #  endif
252 #endif
253 
254 
255