We had the generic lambdas before C++20 and could write something like this.
auto l = [](auto a, auto b)
{
return a+b;
};
And then C++20 introduced template lambdas where we can write something like this
auto l = []<typename T>(T a, T b)
{
return a+b;
};
Or this
auto l = []<typename T>(T a, auto b)
{
return a+b;
};
Can someone explain what is the difference?
To be more specific, what template lambdas can achieve that was impossible with pre C++20 generic lambdas?