Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2017-04-20 14:38:57 +0100
committerPhil Nash2017-04-20 14:39:07 +0100
commit2809be87cc7e7d04a2af8d84355155b64611b479 (patch)
tree0a1826cdf9f8ce813699c542b6c3dc96a6009294 /include
parentac369b7b8362de7ccc9c3f46e4f0c59115ecadcc (diff)
downloadcatch3-2809be87cc7e7d04a2af8d84355155b64611b479.tar.gz
“fixed” alignment in Option
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_option.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp
index 5413abf0..61175ae9 100644
--- a/include/internal/catch_option.hpp
+++ b/include/internal/catch_option.hpp
@@ -66,7 +66,10 @@ namespace Catch {
}
private:
- T* nullableValue;
+ union {
+ T *nullableValue;
+ long double _; // Forces alignment for the storage, following
+ };
char storage[sizeof(T)];
};