[44] | 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_EXTERN_TEMPLATE |
---|
| 46 | #elif __GNUC__ == 3 |
---|
| 47 | # if defined (__PATHSCALE__) |
---|
| 48 | # define BOOST_NO_TWO_PHASE_NAME_LOOKUP |
---|
| 49 | # define BOOST_NO_IS_ABSTRACT |
---|
| 50 | # endif |
---|
| 51 | // |
---|
| 52 | // gcc-3.x problems: |
---|
| 53 | // |
---|
| 54 | // Bug specific to gcc 3.1 and 3.2: |
---|
| 55 | // |
---|
| 56 | # if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) |
---|
| 57 | # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS |
---|
| 58 | # endif |
---|
| 59 | # if __GNUC_MINOR__ < 4 |
---|
| 60 | # define BOOST_NO_IS_ABSTRACT |
---|
| 61 | # endif |
---|
| 62 | # define BOOST_NO_EXTERN_TEMPLATE |
---|
| 63 | #endif |
---|
| 64 | #if __GNUC__ < 4 |
---|
| 65 | // |
---|
| 66 | // All problems to gcc-3.x and earlier here: |
---|
| 67 | // |
---|
| 68 | #define BOOST_NO_TWO_PHASE_NAME_LOOKUP |
---|
| 69 | # ifdef __OPEN64__ |
---|
| 70 | # define BOOST_NO_IS_ABSTRACT |
---|
| 71 | # endif |
---|
| 72 | #endif |
---|
| 73 | |
---|
| 74 | #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) |
---|
| 75 | // Previous versions of GCC did not completely implement value-initialization: |
---|
| 76 | // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize |
---|
| 77 | // members", reported by Jonathan Wakely in 2006, |
---|
| 78 | // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) |
---|
| 79 | // GCC Bug 33916, "Default constructor fails to initialize array members", |
---|
| 80 | // reported by Michael Elizabeth Chastain in 2007, |
---|
| 81 | // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) |
---|
| 82 | // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues |
---|
| 83 | #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION |
---|
| 84 | #endif |
---|
| 85 | |
---|
| 86 | #if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) |
---|
| 87 | # define BOOST_NO_EXCEPTIONS |
---|
| 88 | #endif |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | // |
---|
| 92 | // Threading support: Turn this on unconditionally here (except for |
---|
| 93 | // those platforms where we can know for sure). It will get turned off again |
---|
| 94 | // later if no threading API is detected. |
---|
| 95 | // |
---|
| 96 | #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) |
---|
| 97 | # define BOOST_HAS_THREADS |
---|
| 98 | #endif |
---|
| 99 | |
---|
| 100 | // |
---|
| 101 | // gcc has "long long" |
---|
| 102 | // |
---|
| 103 | #define BOOST_HAS_LONG_LONG |
---|
| 104 | |
---|
| 105 | // |
---|
| 106 | // gcc implements the named return value optimization since version 3.1 |
---|
| 107 | // |
---|
| 108 | #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) |
---|
| 109 | #define BOOST_HAS_NRVO |
---|
| 110 | #endif |
---|
| 111 | |
---|
| 112 | // |
---|
| 113 | // Dynamic shared object (DSO) and dynamic-link library (DLL) support |
---|
| 114 | // |
---|
| 115 | #if __GNUC__ >= 4 |
---|
| 116 | # if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) |
---|
| 117 | // All Win32 development environments, including 64-bit Windows and MinGW, define |
---|
| 118 | // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, |
---|
| 119 | // so does not define _WIN32 or its variants. |
---|
| 120 | # define BOOST_HAS_DECLSPEC |
---|
| 121 | # define BOOST_SYMBOL_EXPORT __attribute__((dllexport)) |
---|
| 122 | # define BOOST_SYMBOL_IMPORT __attribute__((dllimport)) |
---|
| 123 | # else |
---|
| 124 | # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) |
---|
| 125 | # define BOOST_SYMBOL_IMPORT |
---|
| 126 | # endif |
---|
| 127 | # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) |
---|
| 128 | #else |
---|
| 129 | // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined |
---|
| 130 | # define BOOST_SYMBOL_EXPORT |
---|
| 131 | #endif |
---|
| 132 | |
---|
| 133 | // |
---|
| 134 | // RTTI and typeinfo detection is possible post gcc-4.3: |
---|
| 135 | // |
---|
| 136 | #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 |
---|
| 137 | # ifndef __GXX_RTTI |
---|
| 138 | # ifndef BOOST_NO_TYPEID |
---|
| 139 | # define BOOST_NO_TYPEID |
---|
| 140 | # endif |
---|
| 141 | # ifndef BOOST_NO_RTTI |
---|
| 142 | # define BOOST_NO_RTTI |
---|
| 143 | # endif |
---|
| 144 | # endif |
---|
| 145 | #endif |
---|
| 146 | |
---|
| 147 | // C++0x features not implemented in any GCC version |
---|
| 148 | // |
---|
| 149 | #define BOOST_NO_CONSTEXPR |
---|
| 150 | #define BOOST_NO_NULLPTR |
---|
| 151 | #define BOOST_NO_TEMPLATE_ALIASES |
---|
| 152 | |
---|
| 153 | // C++0x features in 4.3.n and later |
---|
| 154 | // |
---|
| 155 | #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) |
---|
| 156 | // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are |
---|
| 157 | // passed on the command line, which in turn defines |
---|
| 158 | // __GXX_EXPERIMENTAL_CXX0X__. |
---|
| 159 | # define BOOST_HAS_DECLTYPE |
---|
| 160 | # define BOOST_HAS_RVALUE_REFS |
---|
| 161 | # define BOOST_HAS_STATIC_ASSERT |
---|
| 162 | # define BOOST_HAS_VARIADIC_TMPL |
---|
| 163 | #else |
---|
| 164 | # define BOOST_NO_DECLTYPE |
---|
| 165 | # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS |
---|
| 166 | # define BOOST_NO_RVALUE_REFERENCES |
---|
| 167 | # define BOOST_NO_STATIC_ASSERT |
---|
| 168 | |
---|
| 169 | // Variadic templates compiler: |
---|
| 170 | // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html |
---|
| 171 | # ifdef __VARIADIC_TEMPLATES |
---|
| 172 | # define BOOST_HAS_VARIADIC_TMPL |
---|
| 173 | # else |
---|
| 174 | # define BOOST_NO_VARIADIC_TEMPLATES |
---|
| 175 | # endif |
---|
| 176 | #endif |
---|
| 177 | |
---|
| 178 | // C++0x features in 4.4.n and later |
---|
| 179 | // |
---|
| 180 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
---|
| 181 | # define BOOST_NO_AUTO_DECLARATIONS |
---|
| 182 | # define BOOST_NO_AUTO_MULTIDECLARATIONS |
---|
| 183 | # define BOOST_NO_CHAR16_T |
---|
| 184 | # define BOOST_NO_CHAR32_T |
---|
| 185 | # define BOOST_NO_DEFAULTED_FUNCTIONS |
---|
| 186 | # define BOOST_NO_DELETED_FUNCTIONS |
---|
| 187 | # define BOOST_NO_INITIALIZER_LISTS |
---|
| 188 | # define BOOST_NO_SCOPED_ENUMS |
---|
| 189 | #endif |
---|
| 190 | |
---|
| 191 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) |
---|
| 192 | # define BOOST_NO_SFINAE_EXPR |
---|
| 193 | #endif |
---|
| 194 | |
---|
| 195 | // C++0x features in 4.4.1 and later |
---|
| 196 | // |
---|
| 197 | #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
---|
| 198 | // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.4.1 |
---|
| 199 | // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 |
---|
| 200 | # define BOOST_NO_SCOPED_ENUMS |
---|
| 201 | #endif |
---|
| 202 | |
---|
| 203 | // C++0x features in 4.5.n and later |
---|
| 204 | // |
---|
| 205 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
---|
| 206 | # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS |
---|
| 207 | # define BOOST_NO_LAMBDAS |
---|
| 208 | # define BOOST_NO_RAW_LITERALS |
---|
| 209 | # define BOOST_NO_UNICODE_LITERALS |
---|
| 210 | #endif |
---|
| 211 | |
---|
| 212 | // ConceptGCC compiler: |
---|
| 213 | // http://www.generic-programming.org/software/ConceptGCC/ |
---|
| 214 | #ifdef __GXX_CONCEPTS__ |
---|
| 215 | # define BOOST_HAS_CONCEPTS |
---|
| 216 | # define BOOST_COMPILER "ConceptGCC version " __VERSION__ |
---|
| 217 | #else |
---|
| 218 | # define BOOST_NO_CONCEPTS |
---|
| 219 | #endif |
---|
| 220 | |
---|
| 221 | #ifndef BOOST_COMPILER |
---|
| 222 | # define BOOST_COMPILER "GNU C++ version " __VERSION__ |
---|
| 223 | #endif |
---|
| 224 | |
---|
| 225 | // |
---|
| 226 | // versions check: |
---|
| 227 | // we don't know gcc prior to version 2.90: |
---|
| 228 | #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) |
---|
| 229 | # error "Compiler not configured - please reconfigure" |
---|
| 230 | #endif |
---|
| 231 | // |
---|
| 232 | // last known and checked version is 4.4 (Pre-release): |
---|
| 233 | #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 4)) |
---|
| 234 | # if defined(BOOST_ASSERT_CONFIG) |
---|
| 235 | # error "Unknown compiler version - please run the configure tests and report the results" |
---|
| 236 | # else |
---|
| 237 | // we don't emit warnings here anymore since there are no defect macros defined for |
---|
| 238 | // gcc post 3.4, so any failures are gcc regressions... |
---|
| 239 | //# warning "Unknown compiler version - please run the configure tests and report the results" |
---|
| 240 | # endif |
---|
| 241 | #endif |
---|
| 242 | |
---|
| 243 | |
---|