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

This commit is contained in:
rdb 2014-07-21 15:41:31 +00:00
parent 29cfc2b778
commit e98618b105

View File

@ -124,7 +124,7 @@ typedef ios::seekdir ios_seekdir;
#if __has_extension(cxx_constexpr)
#define CONSTEXPR constexpr
#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
#else
#define CONSTEXPR INLINE