
17 Feb
2010
17 Feb
'10
5:06 a.m.
Daniel Larimer wrote:
I now understand why Boost.Preprocessor doesn't support variable argument macros. Visual Studio has completely broken support and fails to expand __VA_ARGS__ into multiple tokens. Thus what works beautifully on G++ fails completely on VC++.
Are there any known workarounds or will I need to ask the user of my macros to specify the number of arguments and then be limited to supporting the number of arguments I happen to enumerate?
Dan
...that, or accept Boost.PP seq's (i.e., "( arg0 ) ( arg1 ) ... ( argn )"), which I think is the direction many libraries that provide "variadic" macros take. - Jeff