RESOLVED FIXED 273694
Replace potentially more confusing decltype() usage with template lambdas where possible
https://bugs.webkit.org/show_bug.cgi?id=273694
Summary Replace potentially more confusing decltype() usage with template lambdas whe...
Sam Weinig
Reported 2024-05-03 10:48:43 PDT
A somewhat common patter in WebCore is for a callsite to use a generic lambda but still want to know what the type of the generic argument was. Something like: function([](auto parameter) { using Type = std::decay_t<decltype(parameter)>; ... }); This was necessary in the past due to the lack of template lambdas, but now we have them and this can be come: function([]<typename Type>(Type parameter) { ... });
Attachments
Sam Weinig
Comment 1 2024-05-03 10:55:14 PDT
Radar WebKit Bug Importer
Comment 2 2024-05-03 12:47:50 PDT
EWS
Comment 3 2024-05-03 18:13:32 PDT
Committed 278358@main (5fe8dd6a3b46): <https://commits.webkit.org/278358@main> Reviewed commits have been landed. Closing PR #28109 and removing active labels.
Diego Pino
Comment 4 2024-05-05 01:27:19 PDT
Build bot 'GTK-Linux-64-bit-Release-Debian-11-Build' (and others using GCC10) is failing after this patch with the following build error: https://build.webkit.org/#/builders/992 ``` ../../../Source/WebCore/platform/graphics/ColorSpace.h:136:69: error: expected ‘(’ before ‘{’ token 136 | return callWithColorType<T>(colorSpace, [&]<typename ColorType> { | ^ | ( ```
Diego Pino
Comment 5 2024-05-05 01:29:09 PDT
EWS
Comment 6 2024-05-05 02:09:24 PDT
Committed 278386@main (ab7b68fdc266): <https://commits.webkit.org/278386@main> Reviewed commits have been landed. Closing PR #28151 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.