0
function <void ( int a, int b, int ia, int ib, bool rev, const Vector4f& color )> 
  benchTris = [&pts]( int a, int b, int ia, int ib, bool rev, const Vector4f& color )
{
}

错误是:

error C2027: use of undefined type 'std::_Get_function_impl<_Tx>'
      with
      [
          _Tx=void (int,int,int,int,bool,const Vector4f &)
      ]
      main.cpp(374) : see reference to class template instantiation 'std::function<_Fty>' being compiled
      with
      [
          _Fty=void (int,int,int,int,bool,const Vector4f &)
      ]

如果我删除一个参数,例如a从前面删除一个参数,则可以正常工作:

function <void ( int b, int ia, int ib, bool rev, const Vector4f& color )> 
  benchTris = [&pts]( int b, int ia, int ib, bool rev, const Vector4f& color )
{
   // ok
}

是否有一些我不知道的参数限制?

4

0 回答 0