Which c++ compiler can compile next code?
void (*G2API_CopyGhoul2Instance)(CGhoul2Info_v &ghoul2From,
CGhoul2Info_v &ghoul2To,
int modelIndex = -1); //<--- That's it!
It is not my code and I have a lot of such things. I know that standart didn't allow such declaration, but this comment tells me that some compilers allow it.
P.S. This code from Star Wars Jedi Knight: Jedi Academy source.
std::function/std::bindtoday. Alternatively, it's easily wrapped in a custom functor, andoperator()can have default parameters.