aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/smallstringlayout.h
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2017-01-19 13:07:26 +0100
committerRobert Loehning <robert.loehning@qt.io>2017-01-19 12:21:43 +0000
commiteeb0b8fd21dba8421bd50b475a6442c27b63a1a6 (patch)
tree5e98b54f7dbb41bab5161978540948b62c95f5fd /src/libs/utils/smallstringlayout.h
parent5dc8e9a743481b6e7bddacc4d5597760bfc0d045 (diff)
Revert "Revert "Utils: Remove old compiler support code""
Thomas provided a smaller fix. This reverts commit 78fb7f44bf393d8b9e3e22fcccc4ae7951d4bb6e. Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/libs/utils/smallstringlayout.h')
-rw-r--r--src/libs/utils/smallstringlayout.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/libs/utils/smallstringlayout.h b/src/libs/utils/smallstringlayout.h
index c03bdc4ad80..7fcaefd0078 100644
--- a/src/libs/utils/smallstringlayout.h
+++ b/src/libs/utils/smallstringlayout.h
@@ -29,22 +29,6 @@
#include <cstdint>
-#pragma push_macro("constexpr")
-#ifndef __cpp_constexpr
-#define constexpr
-#endif
-
-#pragma push_macro("noexcept")
-#ifndef __cpp_noexcept
-#define noexcept
-#endif
-
-#ifdef __cpp_alignas
-#define ALIGNAS_16 alignas(16)
-#else
-#define ALIGNAS_16
-#endif
-
namespace Utils {
namespace Internal {
@@ -86,7 +70,7 @@ struct ShortStringLayout {
};
template <uint MaximumShortStringDataAreaSize>
-struct ALIGNAS_16 StringDataLayout {
+struct alignas(16) StringDataLayout {
static_assert( MaximumShortStringDataAreaSize >= 15, "Size must be greater equal than 15 bytes!");
static_assert(((MaximumShortStringDataAreaSize + 1) % 16) == 0, "Size + 1 must be dividable by 16!");
StringDataLayout() noexcept = default;
@@ -136,6 +120,3 @@ struct ALIGNAS_16 StringDataLayout {
} // namespace Internal
} // namespace Utils
-
-#pragma pop_macro("noexcept")
-#pragma pop_macro("constexpr")