[Bug c++/58481] Internal compiler error when passing argument packs to base class method inside a lambda

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 20 16:44:00 GMT 2013


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



More information about the Gcc-bugs mailing list