Tweaked storage alignment "workaround" a bit more in Option.

This commit is contained in:
Phil Nash 2017-04-21 07:18:46 +01:00
parent 8e8259091c
commit eedcc82d31

View File

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