aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/compiler.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-29 08:47:58 -0500
committerJack Lloyd <[email protected]>2017-01-29 17:32:47 -0500
commit132abc842c502229ab9c898eb72c41160da272e2 (patch)
tree8b78c89ec092b08cd72e1035f8f2f13dc1a878f6 /src/lib/utils/compiler.h
parent5373c67475ce087b3b3ebf11d2798749422a4fa7 (diff)
Workaround for MSVC 2013
Diffstat (limited to 'src/lib/utils/compiler.h')
-rw-r--r--src/lib/utils/compiler.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h
index 6065b722a..ed8fad9de 100644
--- a/src/lib/utils/compiler.h
+++ b/src/lib/utils/compiler.h
@@ -32,6 +32,14 @@
#endif
/*
+* Define special macro when building under MSVC 2013 since there are
+* many compiler workarounds required for that version.
+*/
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+ #define BOTAN_BUILD_COMPILER_IS_MSVC_2013
+#endif
+
+/*
* Define BOTAN_FUNC_ISA
*/
#if defined(__GNUG__) || (BOTAN_CLANG_VERSION > 38)
@@ -100,7 +108,7 @@
/*
* Define BOTAN_NOEXCEPT (for MSVC 2013)
*/
-#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#if defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013)
// noexcept is not supported in VS 2013
#include <yvals.h>
#define BOTAN_NOEXCEPT _NOEXCEPT