I would like to know if the standard committee considered expanding the C ++ 14 keyword autoto deduce the type of the function template parameter, as it exists today in common lambdas. ( as one could beautifully portray in this answer )
Since it works in lambda functions, it should also work in any function. Of course, this would be completely redundant with the classic syntax:
template< typename T >
void f(T param);
But having the opportunity to write this, for the same result:
void f(auto param);
I think this will allow for less clogged code (a shorter cleaner) and more consistency in this case:
auto v = func1();
f(v);
, auto type v, f, templated f.
auto auto, .
: , . , user657267, .