https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77914
Bug ID: 77914 Summary: Wrong lambda definition accepted Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: michele.caini at gmail dot com Target Milestone: --- GCC accepts the following code, that is not valid according to the standard: int main() { auto l = []<typename>(){}; l.operator()<void>(); } Flags -Wall -pedantic, no warnings, no errors. It doesn't seem to be an extension of the compiler. Here is a question on SO related to the issue: http://stackoverflow.com/questions/39948567/is-typename-a-valid-lambda-definition