File: fix-alignment.patch

package info (click to toggle)
catch2 3.7.1-0.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,296 kB
  • sloc: cpp: 50,696; python: 1,525; sh: 79; makefile: 18
file content (20 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/catch2/benchmark/catch_constructor.hpp
+++ b/src/catch2/benchmark/catch_constructor.hpp
@@ -18,7 +18,7 @@
     namespace Benchmark {
         namespace Detail {
             template <typename T, bool Destruct>
-            struct ObjectStorage
+            struct alignas(alignof(T)) ObjectStorage
             {
                 ObjectStorage() = default;
 
@@ -67,7 +67,7 @@
 #    pragma GCC diagnostic pop
 #endif
 
-                alignas( T ) unsigned char data[sizeof( T )]{};
+                alignas( alignof(T) ) unsigned char data[sizeof( T )]{};
             };
         } // namespace Detail