From 801084c38cf8534c9c0e4b38117eb95d3c5533f4 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 19 Jun 2017 11:08:08 +0200 Subject: LuaState: Fixed VS2017's throw warnings for destructors. (#3779) --- src/Globals.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index e3a537eaa..4e15473e1 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -49,7 +49,13 @@ #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu" #define SIZE_T_FMT_HEX "%Ix" - #define NORETURN __declspec(noreturn) + #define NORETURN __declspec(noreturn) + #if (_MSC_VER < 1910) + // MSVC 2013 (and possibly 2015?) have no idea about "noexcept(false)" + #define NO_THROW throw(...) + #else + #define NO_THROW noexcept(false) + #endif // Use non-standard defines in #define _USE_MATH_DEFINES @@ -93,7 +99,8 @@ #define SIZE_T_FMT_HEX "%zx" #endif - #define NORETURN __attribute((__noreturn__)) + #define NORETURN __attribute((__noreturn__)) + #define NO_THROW noexcept(false) #else -- cgit v1.2.3