7 ms·
I’m still confused. Presumably you can’t pass an uninstantiated template to a function, so what’s the type of the lambda expression? It’s effectively a callabl
by twoodfin 8y ago
I’m still confused. Presumably you can’t pass an uninstantiated template to a function, so what’s the type of the lambda expression?
It’s effectively a callable object with multiple overloads but I didn’t know lambda syntax could create something like that.
- KayEss 8y agoLambdas have an un-utterable type, so the addition of a template like mechanism in their arguments is something the compiler can do behind the scenes and it all just works. Look for "generic" in this page <https://en.cppreference.com/w/cpp/language/lambda> https://en.cppreference.com/w/cpp/language/lambda>