1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

Everywhere: Work around Clang trunk bug with templated lambda + Variant

Since 2023-09-08, Clang trunk has had a bug which causes a segfault when
evaluating certain `requires` expressions inside templated lambdas.
There isn't an imminent fix on the horizon, so let's work around the
issue by specifying the type of the offending lambda arguments
explicitly.

See https://github.com/llvm/llvm-project/issues/67260
This commit is contained in:
Daniel Bertalan 2023-11-05 17:42:31 +01:00 committed by Andrew Kaster
parent 6c29fc07fc
commit 6f972c190b
3 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,7 @@ ErrorOr<void> recreate_socket_if_needed(T& connection, URL const& url)
if (!connection.socket->is_open() || connection.socket->is_eof()) {
// Create another socket for the connection.
auto set_socket = [&](auto socket) -> ErrorOr<void> {
auto set_socket = [&](NonnullOwnPtr<SocketStorageType>&& socket) -> ErrorOr<void> {
connection.socket = TRY(Core::BufferedSocket<SocketStorageType>::create(move(socket)));
return {};
};