aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scheduler.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-02 15:38:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-02 15:38:15 +0200
commit417be15231cb34a2e858d26b63406d1fb5535cb9 (patch)
tree12c8feacfac7b108405d26cf88ba19284df346c6 /libbuild2/scheduler.hxx
parent343d6e69e412166cfc21f268a51b692cb0201653 (diff)
Replace deprecated std::aligned_storage with alignas
Based on patch by Matthew Krupcale.
Diffstat (limited to 'libbuild2/scheduler.hxx')
-rw-r--r--libbuild2/scheduler.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/scheduler.hxx b/libbuild2/scheduler.hxx
index c34d41b..b579d80 100644
--- a/libbuild2/scheduler.hxx
+++ b/libbuild2/scheduler.hxx
@@ -7,7 +7,8 @@
#include <list>
#include <tuple>
#include <atomic>
-#include <type_traits> // aligned_storage, etc
+#include <cstddef> // max_align_t
+#include <type_traits> // decay, etc
#include <libbuild2/types.hxx>
#include <libbuild2/utility.hxx>
@@ -681,7 +682,7 @@ namespace build2
//
struct task_data
{
- std::aligned_storage<sizeof (void*) * 8>::type data;
+ alignas (std::max_align_t) unsigned char data[sizeof (void*) * 8];
void (*thunk) (scheduler&, lock&, void*);
};