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++/58481] Internal compiler error when passing argument packs to base class method inside a lambda


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58481

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Indeed, let's avoid the big <functional>, this is enough:

struct Test {
  template<typename... Args> inline void triggerTest (Args&&... fargs) { } 
};
struct TestPickled : Test {  
  template<typename... Args> void triggerTest (Args&&... fargs) { 
    [=](Args... as) {
      Test::triggerTest(as...);
      // this->_Test::triggerTest(as...);
      // ^^^^^^^ THIS WORKAROUNDS THE PROBLEM
    } ();        
  }
};

int main()
{
  TestPickled test;
  test.triggerTest();
  return 0;
}


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