Tweaked storage alignment "workaround" a bit more in Option.
This commit is contained in:
parent
8e8259091c
commit
eedcc82d31
1 changed files with 6 additions and 3 deletions
|
@ -66,11 +66,14 @@ namespace Catch {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
T *nullableValue;
|
||||||
union {
|
union {
|
||||||
T *nullableValue;
|
char storage[sizeof(T)];
|
||||||
long double _; // Forces alignment for the storage, following
|
|
||||||
|
// These are here to force alignment for the storage
|
||||||
|
long double dummy1;
|
||||||
|
long long dummy2;
|
||||||
};
|
};
|
||||||
char storage[sizeof(T)];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue