Skip to content

Commit

Permalink
Merge pull request #51 from apolukhin/do-not-use-aligned-storage
Browse files Browse the repository at this point in the history
Do not use deprecated std::aligned_storage
  • Loading branch information
olk authored Aug 28, 2024
2 parents a2171fc + bd2116f commit dbbf042
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/coroutine2/detail/pull_control_block_cc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct pull_coroutine< T >::control_block {
state_t state;
std::exception_ptr except;
bool bvalid;
typename std::aligned_storage< sizeof( T), alignof( T) >::type storage;
alignas(T) unsigned char storage[sizeof(T)];

static void destroy( control_block * cb) noexcept;

Expand Down Expand Up @@ -71,7 +71,7 @@ struct pull_coroutine< T & >::control_block {
state_t state;
std::exception_ptr except;
bool bvalid;
typename std::aligned_storage< sizeof( holder), alignof( holder) >::type storage;
alignas(holder) unsigned char storage[sizeof(holder)];

static void destroy( control_block * cb) noexcept;

Expand Down

0 comments on commit dbbf042

Please sign in to comment.