Skip to content

Commit

Permalink
Fix compilation on gcc 11.3 and gcc 11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
godexsoft committed Dec 19, 2023
1 parent c446526 commit 7e68f4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util/async/impl/Any.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class Any {
Any(Any const&) = default;
Any(Any&&) = default;

Any(std::any&& v) : value_{std::move(v)}
// note: this needs to be `auto` instead of `std::any` because of a bug in gcc 11.4
Any(auto&& v)
requires(std::is_same_v<std::decay_t<decltype(v)>, std::any>)
: value_{std::forward<decltype(v)>(v)}
{
}

Expand Down

0 comments on commit 7e68f4d

Please sign in to comment.