Changed the way noexcept support is handled to (hopefully) fix #275 and #273

This commit is contained in:
Phil Nash 2014-04-23 18:19:19 +01:00
parent f1928b7f24
commit 1a6f2a0a80
8 changed files with 46 additions and 18 deletions

View file

@ -12,11 +12,13 @@
#ifdef __clang__
#if __has_feature(cxx_nullptr)
# if __has_feature(cxx_nullptr)
# define CATCH_CONFIG_CPP11_NULLPTR
# endif
#define CATCH_CONFIG_CPP11_NULLPTR
#endif
# if __has_feature(cxx_noexcept)
# define CATCH_CONFIG_CPP11_NOEXCEPT
# endif
#endif // __clang__
@ -108,13 +110,10 @@
#endif
// noexcept support:
#ifdef CATCH_CPP11_OR_GREATER
# if (__has_feature(cxx_noexcept))
# define CATCH_NOEXCEPT noexcept
# define CATCH_NOEXCEPT_IS(x) noexcept(x)
# endif
#endif
#ifndef CATCH_NO_EXCEPT
#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
# define CATCH_NOEXCEPT noexcept
# define CATCH_NOEXCEPT_IS(x) noexcept(x)
#else
# define CATCH_NOEXCEPT throw()
# define CATCH_NOEXCEPT_IS(x)
#endif