Added new noexcept macros for VS2013 (#229)

This commit is contained in:
Billy O'Neal 2016-05-31 14:52:26 -07:00 committed by Dominic Hamon
parent 74a278e206
commit 3685cad68c
2 changed files with 10 additions and 2 deletions

View File

@ -28,15 +28,23 @@
# define BENCHMARK_UNUSED __attribute__((unused))
# define BENCHMARK_ALWAYS_INLINE __attribute__((always_inline))
# define BENCHMARK_NOEXCEPT noexcept
# define BENCHMARK_NOEXCEPT_OP(x) noexcept(x)
#elif defined(_MSC_VER) && !defined(__clang__)
# define BENCHMARK_UNUSED
# define BENCHMARK_ALWAYS_INLINE __forceinline
# define BENCHMARK_NOEXCEPT
# if _MSC_VER >= 1900
# define BENCHMARK_NOEXCEPT noexcept
# define BENCHMARK_NOEXCEPT_OP(x) noexcept(x)
# else
# define BENCHMARK_NOEXCEPT
# define BENCHMARK_NOEXCEPT_OP(x)
# endif
# define __func__ __FUNCTION__
#else
# define BENCHMARK_UNUSED
# define BENCHMARK_ALWAYS_INLINE
# define BENCHMARK_NOEXCEPT
# define BENCHMARK_NOEXCEPT_OP(x)
#endif
#if defined(__GNUC__)

View File

@ -37,7 +37,7 @@ public:
return log_;
}
BENCHMARK_NORETURN ~CheckHandler() noexcept(false) {
BENCHMARK_NORETURN ~CheckHandler() BENCHMARK_NOEXCEPT_OP(false) {
log_ << std::endl;
CallAbortHandler();
}