Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Tweaked storage alignment "workaround" a bit more in Option.

Commit
eedcc82d313ebb34dac86ddf761cd068b73b4fba
Author
Phil Nash ·
Parents
8e8259091c04

Files · Download .tar.gz

Changes

 include/internal/catch_option.hpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp
index 61175ae9..b4d40ae5 100644
--- a/include/internal/catch_option.hpp
+++ b/include/internal/catch_option.hpp
@@ -66,11 +66,14 @@ namespace Catch {
         }
 
     private:
+        T *nullableValue;
         union {
-            T *nullableValue;
-            long double _; // Forces alignment for the storage, following
+            char storage[sizeof(T)];
+    
+            // These are here to force alignment for the storage
+            long double dummy1;
+            long long dummy2;
         };
-        char storage[sizeof(T)];
     };
 
 } // end namespace Catch