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
|