Merge pull request #4086 from Romain-Geissler-1A/remove-aligned-storage

Remove std::aligned_storage as it is deprecated in C++23.
This commit is contained in:
Günter Obiltschnig 2023-07-18 09:21:04 +02:00 committed by GitHub
commit 951ebbf82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@
#include <algorithm>
#include <typeinfo>
#include <cstring>
#include <cstddef>
#define poco_any_assert(cond) do { if (!(cond)) std::abort(); } while (0)
@ -137,7 +138,8 @@ public:
}
private:
typedef typename std::aligned_storage<SizeV+1>::type AlignerType;
typedef std::max_align_t AlignerType;
static_assert(sizeof(AlignerType) >= SizeV + 1, "Aligner type is bigger than the actual storage, so SizeV should be made bigger otherwise you simply waste unused memory.");
void setLocal(bool local) const
{