This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54104] New: no default argument for 'XXX'
- From: "likan_999.student at sina dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jul 2012 08:51:42 +0000
- Subject: [Bug c++/54104] New: no default argument for 'XXX'
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54104
Bug #: 54104
Summary: no default argument for 'XXX'
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: likan_999.student@sina.com
The following piece of code doesn't compile under gcc 4.7.1 with flag
-std=gnu++11:
template <typename T> struct X {};
template <template <typename T> class P = X, typename U>
void f(const U& m) {
auto g = [] () {};
}
Clang accepts it correctly.
If I remove the line `auto g=...', it compiles successfully.
I am not an expert to standard. So can anyone take a look, and confirm whether
it is a bug of clang or a bug of gcc? Thanks.