Ive been working on getting some of my code originally built on the mac to run under Visual Studio 2008 Express and have run into a weird problem with the variadic macros i use for my assert code :
The macro is defined as :
#define SH_ASSERT( assertID, exp, description, ... ) shAssertBasic( int(exp), assertID, description, __LINE__, __FILE__ , ##__VA_ARGS__ )
This all works fine under gcc (under osx) and used to run under VS 2005 however with 2008 I get the following warning :
warning C4002: too many actual parameters for macro 'SH_ASSERT'
The calling code is simply :
SH_ASSERT(0, donkeys != aliens , "Donkeys are Aliens Code : Code %d condition %d" , 55, 666);
I'm sure Im missing something simple and my google foo is failing me...
Thanks.