[Bug c++/49326] New: Lambda arguments should not have a default value
vanboxem.ruben at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 8 16:41:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49326
Summary: Lambda arguments should not have a default value
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vanboxem.ruben@gmail.com
Currently, GCC 4.6.1 warns in pedantic mode when a lambda is written that
provides default value for an argument:
[](bool a, bool=true){ return !a;} }
Which, according to the FDIS n3290 section 5.1.2/5, should be illegal and thus
give an error.
As the detection code is already present/functional (in -pedantic mode),
changing that into an error shouldn't be hard.
More information about the Gcc-bugs
mailing list