diff --git a/include/SQLiteCpp/Exception.h b/include/SQLiteCpp/Exception.h index 4bf3ede..337807c 100644 --- a/include/SQLiteCpp/Exception.h +++ b/include/SQLiteCpp/Exception.h @@ -45,7 +45,7 @@ public: #endif // Detect whether the compiler supports C++11 noexcept exception specifications. -#if (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7 ) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // GCC 4.7 and following have noexcept #elif defined(__clang__) && __has_feature(cxx_noexcept) // Clang 3.0 and above have noexcept