This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66674] New: name lookup failure in lambda construction in a member function of a template class
- From: "huili80 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Jun 2015 20:47:28 +0000
- Subject: [Bug c++/66674] New: name lookup failure in lambda construction in a member function of a template class
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66674
Bug ID: 66674
Summary: name lookup failure in lambda construction in a member
function of a template class
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: huili80 at gmail dot com
Target Milestone: ---
The following causes internal compiler error with gcc4.8.2.
struct base
{
void foo(){};
};
template < typename >
struct derived : base
{
void foo()
{
auto l = [this](){base::foo();};
// workaround:
// auto l = [this](){this->base::foo();};
};
};
int main()
{
derived<int> d;
d.foo();
}