Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 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 | |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 14 | // GNU C++ compiler setup. |
| 15 | |
| 16 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 17 | // Define NDNBOOST_GCC so we know this is "real" GCC and not some pretender: |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 18 | // |
| 19 | #if !defined(__CUDACC__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 20 | #define NDNBOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 21 | #endif |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 22 | |
| 23 | #if __GNUC__ < 3 |
| 24 | # if __GNUC_MINOR__ == 91 |
| 25 | // egcs 1.1 won't parse shared_ptr.hpp without this: |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 26 | # define NDNBOOST_NO_AUTO_PTR |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 27 | # endif |
| 28 | # if __GNUC_MINOR__ < 95 |
| 29 | // |
| 30 | // Prior to gcc 2.95 member templates only partly |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 31 | // work - define NDNBOOST_MSVC6_MEMBER_TEMPLATES |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 32 | // instead since inline member templates mostly work. |
| 33 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 34 | # define NDNBOOST_NO_MEMBER_TEMPLATES |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 35 | # if __GNUC_MINOR__ >= 9 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 36 | # define NDNBOOST_MSVC6_MEMBER_TEMPLATES |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 37 | # endif |
| 38 | # endif |
| 39 | |
| 40 | # if __GNUC_MINOR__ < 96 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 41 | # define NDNBOOST_NO_SFINAE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 42 | # endif |
| 43 | |
| 44 | # if __GNUC_MINOR__ <= 97 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 45 | # define NDNBOOST_NO_MEMBER_TEMPLATE_FRIENDS |
| 46 | # define NDNBOOST_NO_OPERATORS_IN_NAMESPACE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 47 | # endif |
| 48 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 49 | # define NDNBOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE |
| 50 | # define NDNBOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL |
| 51 | # define NDNBOOST_NO_IS_ABSTRACT |
| 52 | # define NDNBOOST_NO_CXX11_EXTERN_TEMPLATE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 53 | // Variadic macros do not exist for gcc versions before 3.0 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 54 | # define NDNBOOST_NO_CXX11_VARIADIC_MACROS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 55 | #elif __GNUC__ == 3 |
| 56 | # if defined (__PATHSCALE__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 57 | # define NDNBOOST_NO_TWO_PHASE_NAME_LOOKUP |
| 58 | # define NDNBOOST_NO_IS_ABSTRACT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 59 | # endif |
| 60 | // |
| 61 | // gcc-3.x problems: |
| 62 | // |
| 63 | // Bug specific to gcc 3.1 and 3.2: |
| 64 | // |
| 65 | # if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 66 | # define NDNBOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 67 | # endif |
| 68 | # if __GNUC_MINOR__ < 4 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 69 | # define NDNBOOST_NO_IS_ABSTRACT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 70 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 71 | # define NDNBOOST_NO_CXX11_EXTERN_TEMPLATE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 72 | #endif |
| 73 | #if __GNUC__ < 4 |
| 74 | // |
| 75 | // All problems to gcc-3.x and earlier here: |
| 76 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 77 | #define NDNBOOST_NO_TWO_PHASE_NAME_LOOKUP |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 78 | # ifdef __OPEN64__ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 79 | # define NDNBOOST_NO_IS_ABSTRACT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 80 | # endif |
| 81 | #endif |
| 82 | |
| 83 | #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) |
| 84 | // Previous versions of GCC did not completely implement value-initialization: |
| 85 | // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize |
| 86 | // members", reported by Jonathan Wakely in 2006, |
| 87 | // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) |
| 88 | // GCC Bug 33916, "Default constructor fails to initialize array members", |
| 89 | // reported by Michael Elizabeth Chastain in 2007, |
| 90 | // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) |
| 91 | // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 92 | #define NDNBOOST_NO_COMPLETE_VALUE_INITIALIZATION |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 93 | #endif |
| 94 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 95 | #if !defined(__EXCEPTIONS) && !defined(NDNBOOST_NO_EXCEPTIONS) |
| 96 | # define NDNBOOST_NO_EXCEPTIONS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 97 | #endif |
| 98 | |
| 99 | |
| 100 | // |
| 101 | // Threading support: Turn this on unconditionally here (except for |
| 102 | // those platforms where we can know for sure). It will get turned off again |
| 103 | // later if no threading API is detected. |
| 104 | // |
| 105 | #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 106 | # define NDNBOOST_HAS_THREADS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 107 | #endif |
| 108 | |
| 109 | // |
| 110 | // gcc has "long long" |
| 111 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 112 | #define NDNBOOST_HAS_LONG_LONG |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 113 | |
| 114 | // |
| 115 | // gcc implements the named return value optimization since version 3.1 |
| 116 | // |
| 117 | #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 118 | #define NDNBOOST_HAS_NRVO |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 119 | #endif |
| 120 | |
| 121 | // |
| 122 | // Dynamic shared object (DSO) and dynamic-link library (DLL) support |
| 123 | // |
| 124 | #if __GNUC__ >= 4 |
| 125 | # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) |
| 126 | // All Win32 development environments, including 64-bit Windows and MinGW, define |
| 127 | // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, |
| 128 | // so does not define _WIN32 or its variants. |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 129 | # define NDNBOOST_HAS_DECLSPEC |
| 130 | # define NDNBOOST_SYMBOL_EXPORT __attribute__((dllexport)) |
| 131 | # define NDNBOOST_SYMBOL_IMPORT __attribute__((dllimport)) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 132 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 133 | # define NDNBOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) |
| 134 | # define NDNBOOST_SYMBOL_IMPORT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 135 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 136 | # define NDNBOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 137 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 138 | // config/platform/win32.hpp will define NDNBOOST_SYMBOL_EXPORT, etc., unless already defined |
| 139 | # define NDNBOOST_SYMBOL_EXPORT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 140 | #endif |
| 141 | |
| 142 | // |
| 143 | // RTTI and typeinfo detection is possible post gcc-4.3: |
| 144 | // |
| 145 | #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 |
| 146 | # ifndef __GXX_RTTI |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 147 | # ifndef NDNBOOST_NO_TYPEID |
| 148 | # define NDNBOOST_NO_TYPEID |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 149 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 150 | # ifndef NDNBOOST_NO_RTTI |
| 151 | # define NDNBOOST_NO_RTTI |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 152 | # endif |
| 153 | # endif |
| 154 | #endif |
| 155 | |
| 156 | // |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 157 | // Recent GCC versions have __int128 when in 64-bit mode. |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 158 | // |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 159 | // We disable this if the compiler is really nvcc as it |
| 160 | // doesn't actually support __int128 as of CUDA_VERSION=5000 |
| 161 | // even though it defines __SIZEOF_INT128__. |
| 162 | // See https://svn.boost.org/trac/boost/ticket/8048 |
| 163 | // Only re-enable this for nvcc if you're absolutely sure |
| 164 | // of the circumstances under which it's supported: |
| 165 | // |
| 166 | #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 167 | # define NDNBOOST_HAS_INT128 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 168 | #endif |
| 169 | |
| 170 | // C++0x features in 4.3.n and later |
| 171 | // |
| 172 | #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 173 | // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are |
| 174 | // passed on the command line, which in turn defines |
| 175 | // __GXX_EXPERIMENTAL_CXX0X__. |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 176 | # define NDNBOOST_HAS_DECLTYPE |
| 177 | # define NDNBOOST_HAS_RVALUE_REFS |
| 178 | # define NDNBOOST_HAS_STATIC_ASSERT |
| 179 | # define NDNBOOST_HAS_VARIADIC_TMPL |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 180 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 181 | # define NDNBOOST_NO_CXX11_DECLTYPE |
| 182 | # define NDNBOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS |
| 183 | # define NDNBOOST_NO_CXX11_RVALUE_REFERENCES |
| 184 | # define NDNBOOST_NO_CXX11_STATIC_ASSERT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 185 | |
| 186 | // Variadic templates compiler: |
| 187 | // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html |
| 188 | # if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 189 | # define NDNBOOST_HAS_VARIADIC_TMPL |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 190 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 191 | # define NDNBOOST_NO_CXX11_VARIADIC_TEMPLATES |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 192 | # endif |
| 193 | #endif |
| 194 | |
| 195 | // C++0x features in 4.4.n and later |
| 196 | // |
| 197 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 198 | # define NDNBOOST_NO_CXX11_AUTO_DECLARATIONS |
| 199 | # define NDNBOOST_NO_CXX11_AUTO_MULTIDECLARATIONS |
| 200 | # define NDNBOOST_NO_CXX11_CHAR16_T |
| 201 | # define NDNBOOST_NO_CXX11_CHAR32_T |
| 202 | # define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST |
| 203 | # define NDNBOOST_NO_CXX11_DEFAULTED_FUNCTIONS |
| 204 | # define NDNBOOST_NO_CXX11_DELETED_FUNCTIONS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 205 | #endif |
| 206 | |
| 207 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 208 | # define NDNBOOST_NO_SFINAE_EXPR |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 209 | #endif |
| 210 | |
| 211 | // C++0x features in 4.5.0 and later |
| 212 | // |
| 213 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 214 | # define NDNBOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS |
| 215 | # define NDNBOOST_NO_CXX11_LAMBDAS |
| 216 | # define NDNBOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS |
| 217 | # define NDNBOOST_NO_CXX11_RAW_LITERALS |
| 218 | # define NDNBOOST_NO_CXX11_UNICODE_LITERALS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 219 | #endif |
| 220 | |
| 221 | // C++0x features in 4.5.1 and later |
| 222 | // |
| 223 | #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 224 | // scoped enums have a serious bug in 4.4.0, so define NDNBOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 225 | // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 226 | # define NDNBOOST_NO_CXX11_SCOPED_ENUMS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 227 | #endif |
| 228 | |
| 229 | // C++0x features in 4.6.n and later |
| 230 | // |
| 231 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 232 | #define NDNBOOST_NO_CXX11_CONSTEXPR |
| 233 | #define NDNBOOST_NO_CXX11_NOEXCEPT |
| 234 | #define NDNBOOST_NO_CXX11_NULLPTR |
| 235 | #define NDNBOOST_NO_CXX11_RANGE_BASED_FOR |
| 236 | #define NDNBOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 237 | #endif |
| 238 | |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 239 | // C++0x features in 4.7.n and later |
| 240 | // |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 241 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 242 | # define NDNBOOST_NO_CXX11_TEMPLATE_ALIASES |
| 243 | # define NDNBOOST_NO_CXX11_USER_DEFINED_LITERALS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 244 | #endif |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 245 | |
| 246 | // C++0x features in 4.8.1 and later |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 247 | // |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 248 | #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 249 | # define NDNBOOST_NO_CXX11_DECLTYPE_N3276 |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 250 | #endif |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 251 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 252 | #ifndef NDNBOOST_COMPILER |
| 253 | # define NDNBOOST_COMPILER "GNU C++ version " __VERSION__ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 254 | #endif |
| 255 | |
| 256 | // ConceptGCC compiler: |
| 257 | // http://www.generic-programming.org/software/ConceptGCC/ |
| 258 | #ifdef __GXX_CONCEPTS__ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 259 | # define NDNBOOST_HAS_CONCEPTS |
| 260 | # define NDNBOOST_COMPILER "ConceptGCC version " __VERSION__ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 261 | #endif |
| 262 | |
| 263 | // versions check: |
| 264 | // we don't know gcc prior to version 2.90: |
| 265 | #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) |
| 266 | # error "Compiler not configured - please reconfigure" |
| 267 | #endif |
| 268 | // |
| 269 | // last known and checked version is 4.6 (Pre-release): |
| 270 | #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 271 | # if defined(NDNBOOST_ASSERT_CONFIG) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 272 | # error "Unknown compiler version - please run the configure tests and report the results" |
| 273 | # else |
| 274 | // we don't emit warnings here anymore since there are no defect macros defined for |
| 275 | // gcc post 3.4, so any failures are gcc regressions... |
| 276 | //# warning "Unknown compiler version - please run the configure tests and report the results" |
| 277 | # endif |
| 278 | #endif |
| 279 | |
| 280 | |