mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-08 23:29:53 +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:
|
private:
|
||||||
T *nullableValue;
|
T *nullableValue;
|
||||||
union {
|
alignas(alignof(T)) char storage[sizeof(T)];
|
||||||
char storage[sizeof(T)];
|
|
||||||
|
|
||||||
// These are here to force alignment for the storage
|
|
||||||
long double dummy1;
|
|
||||||
void (*dummy2)();
|
|
||||||
long double dummy3;
|
|
||||||
long long dummy4;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
Loading…
Reference in New Issue
Block a user