Merge pull request #51 from apolukhin/do-not-use-aligned-storage

Do not use deprecated std::aligned_storage
This commit is contained in:
Oliver Kowalke 2024-08-28 12:53:39 +02:00 committed by GitHub
commit dbbf042e0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;