In C ++ 14, something like this was made legal (for lambdas ): -
auto l = [](auto x, auto y) { return x+y; };
However, something like this is still not legal: -
auto sum (auto x, auto y) { return x+y; }
My curiosity is why not the second one added to the standard (although it is assumed that it will be added in C ++ 17, I hope)? What were the pros and cons of the second?
source share