https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77912
--- Comment #4 from Jeff Mirwaisi <jeff.mirwaisi at gmail dot com> ---
//To clarify:
template<class T struct S{S(T){}};
template<class T> void f(T t){ S(t); } //deduction fails
int main()
{
auto F=[]{};
//bug 77890 - fails
S(F); //this should construct a temporary object deduced as type
S<decltype(F)>
//bug 77912 - fails
[](auto A){
S(A); //this should construct a temporary object deduced as type
S<decltype(A)>
};
//it is not the lambda type that is being used as a constructor argument, its
the
//generic parameter in the lambda function
//worse yet, in the use of:
f( 42 ); //within the body of the template function f, the deduction also
fails, an
//S<int> should be deduced
}