Added new noexcept macros for VS2013 (#229)
diff --git a/include/benchmark/macros.h b/include/benchmark/macros.h
index 3e9540e..09d13c1 100644
--- a/include/benchmark/macros.h
+++ b/include/benchmark/macros.h
@@ -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__)
diff --git a/src/check.h b/src/check.h
index cb49c49..4572bab 100644
--- a/src/check.h
+++ b/src/check.h
@@ -37,7 +37,7 @@
return log_;
}
- BENCHMARK_NORETURN ~CheckHandler() noexcept(false) {
+ BENCHMARK_NORETURN ~CheckHandler() BENCHMARK_NOEXCEPT_OP(false) {
log_ << std::endl;
CallAbortHandler();
}