diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp index 8b146da6..6653649e 100644 --- a/include/internal/catch_option.hpp +++ b/include/internal/catch_option.hpp @@ -67,15 +67,7 @@ namespace Catch { private: T *nullableValue; - union { - char storage[sizeof(T)]; - - // These are here to force alignment for the storage - long double dummy1; - void (*dummy2)(); - long double dummy3; - long long dummy4; - }; + alignas(alignof(T)) char storage[sizeof(T)]; }; } // end namespace Catch