Utils: compile work around for MSVC 2015 update 3

Seems to be a compiler bug and can be removed if fixed in the compiler.

Change-Id: I5c1aad3b135298ced0a9b706f2aab483b04abc56
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2017-01-30 14:07:29 +01:00
parent c072cdfb88
commit 1dd407736a

View File

@@ -29,6 +29,12 @@
#include <cstdint>
#ifdef Q_CC_MSVC
# define ALIGNAS_16
#elif
# define ALIGNAS_16 alignas(16)
#endif
namespace Utils {
namespace Internal {
@@ -70,7 +76,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;