aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/smallstringview.h
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2017-01-19 12:43:39 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2017-01-19 11:47:26 +0000
commit78fb7f44bf393d8b9e3e22fcccc4ae7951d4bb6e (patch)
tree88f16f0f2c284e39e3e9f96e063900ad93f2034f /src/libs/utils/smallstringview.h
parent8a32bcc5e78032777137298f361d94a3d332fc2b (diff)
Revert "Utils: Remove old compiler support code"
This reverts commit 8a32bcc5e78032777137298f361d94a3d332fc2b. Broke build with MSVC 2015, update 3 Change-Id: Icb59b70fb00ea2a2ecc8d26c8177d21d82aaccf2 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/libs/utils/smallstringview.h')
-rw-r--r--src/libs/utils/smallstringview.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libs/utils/smallstringview.h b/src/libs/utils/smallstringview.h
index 71d04fe20d2..c0cb4aedbb3 100644
--- a/src/libs/utils/smallstringview.h
+++ b/src/libs/utils/smallstringview.h
@@ -31,6 +31,16 @@
#include <cstring>
+#pragma push_macro("constexpr")
+#ifndef __cpp_constexpr
+#define constexpr
+#endif
+
+#pragma push_macro("noexcept")
+#ifndef __cpp_noexcept
+#define noexcept
+#endif
+
namespace Utils {
class SmallStringView
@@ -125,3 +135,6 @@ bool operator!=(const SmallStringView& first, const SmallStringView& second) noe
}
} // namespace Utils
+
+#pragma pop_macro("noexcept")
+#pragma pop_macro("constexpr")