This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62219] New: [c++11] Spurious error for lambda in a friend function of a class template with a default template parameters
- From: "eric.niebler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Aug 2014 18:32:21 +0000
- Subject: [Bug c++/62219] New: [c++11] Spurious error for lambda in a friend function of a class template with a default template parameters
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62219
Bug ID: 62219
Summary: [c++11] Spurious error for lambda in a friend function
of a class template with a default template parameters
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
This code:
template< class = void >
struct S
{
friend void foo( S )
{
[](){};
}
};
Gives me:
test.cpp: In function âvoid foo(S< <template-parameter-1-1> >)â:
test.cpp:6:8: error: default argument for template parameter for class
enclosing âfoo(S< <template-parameter-1-1> >)::<lambda>â
[](){};
^
I'm not sure what the error is trying to tell me. FWIW, the code compiles
cleanly with clang.