mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-23 05:46:11 +01:00
Fix alignment for Catch::Option
This is so much easier in C++11...
This commit is contained in:
parent
7e14232924
commit
bffef1bffa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user