This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66674] New: name lookup failure in lambda construction in a member function of a template class


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]