In Timur Doumler's talk at CppCon 2022, "C++ Lambda Idioms", at around 45:19 he is discussing the lambda overload trick and says something like
In C++17, we had to write a deduction guide to make this work -- which is like two more lines of code -- but since C++20 we have [I don't know what he is saying] so we don't have to do that any more ...
Why is a deduction guide no longer required to create a lambda overload set in C++20?
For the following class template:
If we want the following initialization to work in C++17:
We have to manually add a deduction guide for it since the compiler cannot deduce the type of
Ts...Thanks to the introduction of P1816 (Class Template Argument Deduction for aggregates), we no longer need to explicitly provide a deduction guide for the aggregates type
Sin C++20, the compiler will automatically deduce the type ofTs...for us, which is the type of those lambdas.That's what the video is about