2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-01-19 04:12:09 +00:00

avoid deprecated std::aligned_storage

This commit is contained in:
Jakob Lovhall
2023-12-12 18:43:47 +01:00
parent 88b8304e78
commit baca65edde

View File

@@ -157,7 +157,7 @@ public:
template< typename R >
class shared_state : public shared_state_base {
private:
typename std::aligned_storage< sizeof( R), alignof( R) >::type storage_{};
alignas(alignof( R)) unsigned char storage_[sizeof( R)]{};
void set_value_( R const& value, std::unique_lock< mutex > & lk) {
BOOST_ASSERT( lk.owns_lock() );