Skip to content

Commit

Permalink
Fix GCC build failures (#319)
Browse files Browse the repository at this point in the history
The CI shows that GCC doesn't know about `std::max_align_t`. This should
be a GCC's bug. Use `::max_align_t` to workaround this.
  • Loading branch information
ChuanqiXu9 committed Jun 6, 2023
1 parent 00a2c9d commit ae3a149
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion async_simple/coro/Lazy.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <atomic>
#include <concepts>
#include <cstddef>
#include <cstdio>
#include <exception>
#include <variant>
Expand Down Expand Up @@ -128,7 +129,7 @@ class LazyPromiseBase {
template <typename T>
class LazyPromise : public LazyPromiseBase {
public:
static_assert(alignof(T) <= alignof(std::max_align_t),
static_assert(alignof(T) <= alignof(::max_align_t),
"async_simple doesn't allow Lazy with over aligned object");

LazyPromise() noexcept {}
Expand Down

0 comments on commit ae3a149

Please sign in to comment.