diff options
Diffstat (limited to 'src/warnings.hpp')
-rw-r--r-- | src/warnings.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/warnings.hpp b/src/warnings.hpp index 40d214d..9ce78ee 100644 --- a/src/warnings.hpp +++ b/src/warnings.hpp @@ -213,10 +213,14 @@ EG(-Wclobbered) E(-Wcomment) // A fixable difference between c++11 and c++14 -#if (defined(__clang__)) && __has_warning("-Wconstexpr-not-const") +#ifdef __clang__ +# if __has_warning("-Wconstexpr-not-const") EC(-Wconstexpr-not-const) +# else +static_assert('E', "-Wconstexpr-not-const not in this clang version"); +# endif #else -static_assert('?', "-Wconstexpr-not-const not in this version") +static_assert('E', "-Wconstexpr-not-const not in GCC"); #endif /// Warn for implicit type conversions that may |