aboutsummaryrefslogtreecommitdiffstats
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
parent5373c67475ce087b3b3ebf11d2798749422a4fa7 (diff)
Workaround for MSVC 2013
-rw-r--r--src/lib/utils/compiler.h10
-rw-r--r--src/lib/utils/simd/simd_32.h7
2 files changed, 14 insertions, 3 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
diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h
index 11ed709f6..51d1f1b6b 100644
--- a/src/lib/utils/simd/simd_32.h
+++ b/src/lib/utils/simd/simd_32.h
@@ -44,10 +44,13 @@ class SIMD_4x32 final
{
public:
- SIMD_4x32(const SIMD_4x32& other) = default;
- SIMD_4x32(SIMD_4x32&& other) = default;
SIMD_4x32& operator=(const SIMD_4x32& other) = default;
+ SIMD_4x32(const SIMD_4x32& other) = default;
+
+#if !defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013)
SIMD_4x32& operator=(SIMD_4x32&& other) = default;
+ SIMD_4x32(SIMD_4x32&& other) = default;
+#endif
/**
* Zero initialize SIMD register with 4 32-bit elements