Boost logo

Boost :

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?
> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at