https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81282
Bug ID: 81282 Summary: templated Lambda ,auto Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asif_bahrainwala at hotmail dot com Target Milestone: --- Compilation issues, might be similar to 67838 #include <iostream> #include <vector> #include <algorithm> #include<iostream> using namespace std; template<typename T1> auto a1=[](T1 y1)->T1{ return y1; }; int main() { cout<<a1<int>(3); } code fails to compile when using g++ main.cpp -std=c++14 compiles fine when using g++ main.cpp -std=c++11 gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.