“fixed” alignment in Option

This commit is contained in:
Phil Nash 2017-04-20 14:38:57 +01:00
parent ac369b7b83
commit 2809be87cc
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ namespace Catch {
} }
private: private:
T* nullableValue; union {
T *nullableValue;
long double _; // Forces alignment for the storage, following
};
char storage[sizeof(T)]; char storage[sizeof(T)];
}; };