mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 15:14:01 +00:00
Merge pull request #51 from apolukhin/do-not-use-aligned-storage
Do not use deprecated std::aligned_storage
This commit is contained in:
commit
dbbf042e0a
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user