From 16be0dc3aa03ab53bd05e3f32bfd8da0c9f17ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 27 May 2015 12:26:30 +0200 Subject: [PATCH] Fix #58 "Compile fails in gcc 5.1.0" : correct detection of noexcept support for GCC >= 4.7 --- include/SQLiteCpp/Exception.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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