Subject: Re: [boost] [Boost.Preprocessor] FOREACH( MACRO, ... )
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2010-02-17 00:06:51
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?
...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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk