Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2005-05-03 12:58:41


> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
> h=received:reply-to:to:subject:date:mime-version:content-type:content-transfer-encoding:x-mailer:in-reply-to:x-mimeole:thread-index:from:message-id;
> b=WTqy2ZzElSjVOko42hSMlVaGVYsNJkgfjuf/gEgdKQQNFzgJGphTKVFQKgrzQwSxRKwi6CjXwWKE69dbn4KZkg2HZ/Trr3llzJvLMt/fUWsK6/6CVByrUGiPwlskzE6+/xMIUZKwAKpM6IXTz+59/QaOOjg0Qo+E4qPR5JQ8VvU=
From: Hartmut Kaiser <hartmut.kaiser_at_[hidden]>
> Pavel Vozenilek wrote:
>
> > I'd rather like to know whether I can do a
> > #define FOREACH(...) BOOST_FOREACH(...) in my code.
>
> This can be problematic if the arguments are macros itself. This would
> result in an additional expansion of these macros. But you may want to
> write:
>
> #define FOREACH BOOST_FOREACH
>
> which is save in this regard.

Pavel, that can be spelled this way too:

   #define FOREAcH BOOST_FOR_EACH

IOW, if you want it spelled FOREACH, then Eric's macro's name
doesn't matter.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk