diff options
author | Marco Bubke <marco.bubke@qt.io> | 2017-01-17 16:30:41 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2017-01-19 10:59:40 +0000 |
commit | 8a32bcc5e78032777137298f361d94a3d332fc2b (patch) | |
tree | 9e4c4c42872e5eb9447903af79002a2d5d4244e8 /src/libs/utils/smallstringlayout.h | |
parent | 89a3dbb5468add639b9eb9a8ea8a99b6bdb08662 (diff) |
Utils: Remove old compiler support code
We now support constexpr, noexcept and alignas on all compilers. Next will
be C++ 14 constexpr support.
Change-Id: I254049c60dcd82fc373ec907cbb5702a4b344978
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/utils/smallstringlayout.h')
-rw-r--r-- | src/libs/utils/smallstringlayout.h | 21 |
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") |