We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa6662a commit 072ebfeCopy full SHA for 072ebfe
1 file changed
include/asio/co_composed.hpp
@@ -994,7 +994,13 @@ class co_composed_promise
994
995
union block
996
{
997
+#if defined(ASIO_MSVC) && !defined(__clang__)
998
+ // Force 16-byte alignment as std::max_align_t is only 8-byte aligned on
999
+ // MSVC, but the compiler may emit aligned SSE stores into the storage.
1000
+ alignas(16) std::max_align_t max_align;
1001
+#else // defined(ASIO_MSVC) && !defined(__clang__)
1002
std::max_align_t max_align;
1003
+#endif // defined(ASIO_MSVC) && !defined(__clang__)
1004
alignas(allocator_type) char pad[alignof(allocator_type)];
1005
};
1006
0 commit comments