Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which compiler supported with function pointer with default arguments?

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.

like image 803
Avega Avatar asked Apr 05 '13 12:04

Avega


1 Answers

Can't suggest the compiler though I've found a useful link which lists out the fixes that are required to the code to successfully compile it with GCC compiler.

http://www.lucasforums.com/showthread.php?t=203922

Hope it is useful to you.

like image 86
Murtuza Kabul Avatar answered Oct 24 '22 01:10

Murtuza Kabul