Browse Source

Only use constexpr when the compiler conforms to C++11

rdb 11 years ago
parent
commit
e98618b105
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/dtoolbase/dtoolbase_cc.h

+ 1 - 1
dtool/src/dtoolbase/dtoolbase_cc.h

@@ -124,7 +124,7 @@ typedef ios::seekdir ios_seekdir;
 #if __has_extension(cxx_constexpr)
 #if __has_extension(cxx_constexpr)
 #define CONSTEXPR constexpr
 #define CONSTEXPR constexpr
 #endif
 #endif
-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && (__cplusplus >= 201103L)
 #define CONSTEXPR constexpr
 #define CONSTEXPR constexpr
 #else
 #else
 #define CONSTEXPR INLINE
 #define CONSTEXPR INLINE