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();
}

Reply via email to