Revert "Revert "Utils: Remove old compiler support code""

Thomas provided a smaller fix.
This reverts commit 78fb7f44bf.

Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Robert Loehning
2017-01-19 13:07:26 +01:00
parent 5dc8e9a743
commit eeb0b8fd21
8 changed files with 1 additions and 84 deletions

View File

@@ -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")