Fix alignment for Catch::Option

This is so much easier in C++11...
This commit is contained in:
Martin Hořeňovský 2017-05-08 00:59:44 +02:00
parent 7e14232924
commit bffef1bffa
1 changed files with 1 additions and 9 deletions

View File

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