From eedcc82d313ebb34dac86ddf761cd068b73b4fba Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 21 Apr 2017 07:18:46 +0100 Subject: [PATCH] Tweaked storage alignment "workaround" a bit more in Option. --- include/internal/catch_option.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp index 61175ae9..b4d40ae5 100644 --- a/include/internal/catch_option.hpp +++ b/include/internal/catch_option.hpp @@ -66,11 +66,14 @@ namespace Catch { } private: + T *nullableValue; union { - T *nullableValue; - long double _; // Forces alignment for the storage, following + char storage[sizeof(T)]; + + // These are here to force alignment for the storage + long double dummy1; + long long dummy2; }; - char storage[sizeof(T)]; }; } // end namespace Catch