C++11 VS 2012 functor seems to choke when I have more than 5 parameters
Posted
by
bobobobo
on Stack Overflow
See other posts from Stack Overflow
or by bobobobo
Published on 2013-06-26T22:19:28Z
Indexed on
2013/06/26
22:21 UTC
Read the original article
Hit count: 359
c++
|visual-studio-2012
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 )
{
}
The error is:
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 &)
]
Works ok if I remove ONE parameter, for example a
from the front:
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
}
Is there some parameter limit I don't know about?
© Stack Overflow or respective owner