|
| 1 | +diff --git a/include/grpcpp/impl/codegen/server_context.h b/include/grpcpp/impl/codegen/server_context.h |
| 2 | +index 5a62873ec8..46b797c814 100644 |
| 3 | +--- a/include/grpcpp/impl/codegen/server_context.h |
| 4 | ++++ b/include/grpcpp/impl/codegen/server_context.h |
| 5 | +@@ -513,8 +513,7 @@ class ServerContextBase { |
| 6 | + const std::function<void(::grpc::Status s)> func_; |
| 7 | + }; |
| 8 | + |
| 9 | +- typename std::aligned_storage<sizeof(Reactor), alignof(Reactor)>::type |
| 10 | +- default_reactor_; |
| 11 | ++ alignas(Reactor) std::byte default_reactor_[sizeof(Reactor)]; |
| 12 | + std::atomic_bool default_reactor_used_{false}; |
| 13 | + std::unique_ptr<TestServerCallbackUnary> test_unary_; |
| 14 | + }; |
| 15 | +diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.cc b/src/core/ext/filters/http/message_compress/message_compress_filter.cc |
| 16 | +index 09c914fab0..88d92210ef 100644 |
| 17 | +--- a/src/core/ext/filters/http/message_compress/message_compress_filter.cc |
| 18 | ++++ b/src/core/ext/filters/http/message_compress/message_compress_filter.cc |
| 19 | +@@ -164,9 +164,7 @@ class CallData { |
| 20 | + grpc_linked_mdelem accept_stream_encoding_storage_; |
| 21 | + grpc_slice_buffer slices_; /**< Buffers up input slices to be compressed */ |
| 22 | + // Allocate space for the replacement stream |
| 23 | +- std::aligned_storage<sizeof(grpc_core::SliceBufferByteStream), |
| 24 | +- alignof(grpc_core::SliceBufferByteStream)>::type |
| 25 | +- replacement_stream_; |
| 26 | ++ alignas(grpc_core::SliceBufferByteStream) std::byte replacement_stream_[sizeof(grpc_core::SliceBufferByteStream)]; |
| 27 | + grpc_closure* original_send_message_on_complete_ = nullptr; |
| 28 | + grpc_closure send_message_on_complete_; |
| 29 | + grpc_closure on_send_message_next_done_; |
| 30 | +diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc |
| 31 | +index 4ab8a5638c..0c8dc75567 100644 |
| 32 | +--- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc |
| 33 | ++++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc |
| 34 | +@@ -123,9 +123,7 @@ class CallData { |
| 35 | + // It is initialized during construction and reset when a new stream is |
| 36 | + // created using it. |
| 37 | + grpc_slice_buffer recv_slices_; |
| 38 | +- std::aligned_storage<sizeof(SliceBufferByteStream), |
| 39 | +- alignof(SliceBufferByteStream)>::type |
| 40 | +- recv_replacement_stream_; |
| 41 | ++ alignas(SliceBufferByteStream) std::byte recv_replacement_stream_[sizeof(SliceBufferByteStream)]; |
| 42 | + // Fields for handling recv_trailing_metadata_ready callback |
| 43 | + bool seen_recv_trailing_metadata_ready_ = false; |
| 44 | + grpc_closure on_recv_trailing_metadata_ready_; |
| 45 | +diff --git a/src/core/lib/gprpp/manual_constructor.h b/src/core/lib/gprpp/manual_constructor.h |
| 46 | +index 7ee13796ee..2a5d40e964 100644 |
| 47 | +--- a/src/core/lib/gprpp/manual_constructor.h |
| 48 | ++++ b/src/core/lib/gprpp/manual_constructor.h |
| 49 | +@@ -159,10 +159,8 @@ class PolymorphicManualConstructor { |
| 50 | + GPR_ASSERT(static_cast<BaseType*>(p) == p); |
| 51 | + } |
| 52 | + |
| 53 | +- typename std::aligned_storage< |
| 54 | +- grpc_core::manual_ctor_impl::max_size_of<DerivedTypes...>::value, |
| 55 | +- grpc_core::manual_ctor_impl::max_align_of<DerivedTypes...>::value>::type |
| 56 | +- space_; |
| 57 | ++ alignas(grpc_core::manual_ctor_impl::max_align_of<DerivedTypes...>::value) |
| 58 | ++ std::byte space_[grpc_core::manual_ctor_impl::max_size_of<DerivedTypes...>::value]; |
| 59 | + }; |
| 60 | + |
| 61 | + template <typename Type> |
| 62 | +@@ -205,7 +203,7 @@ class ManualConstructor { |
| 63 | + void Destroy() { get()->~Type(); } |
| 64 | + |
| 65 | + private: |
| 66 | +- typename std::aligned_storage<sizeof(Type), alignof(Type)>::type space_; |
| 67 | ++ alignas(Type) std::byte space_[sizeof(Type)]; |
| 68 | + }; |
| 69 | + |
| 70 | + } // namespace grpc_core |
0 commit comments