Fix #58 "Compile fails in gcc 5.1.0" : correct detection of noexcept support for GCC >= 4.7

This commit is contained in:
Sébastien Rombauts 2015-05-27 12:26:30 +02:00
parent 9bb0aed805
commit 16be0dc3aa

View File

@ -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