I am trying to save a function to be called later, here is a snippet.
This works great:
void RandomClass::aFunc( int param1, int param2, double param3, bool isQueued ) { auto storeFunc = std::bind (&RandomClass::aFunc, this, param1, param2, param3, true); CommandList.push( storeFunc ); }
However, if RandomClass is static, so I believe I should do this:
void RandomClass::aFunc( int param1, int param2, double param3, bool isQueued ) { auto storeFunc = std::bind (&RandomClass::aFunc, param1, param2, param3, true); CommandList.push( storeFunc ); }
But this does not work, I get a compilation error
error C2668: 'std :: tr1 :: bind': ambiguous call to an overloaded function
Any help was appreciated.
source share