|
Boost : |
From: Andrei Alexandrescu (See Website For Email) (SeeWebsiteForEmail_at_[hidden])
Date: 2005-04-25 16:58:41
Caleb Epstein wrote:
> On 4/25/05, Victor A. Wagner Jr. <vawjr_at_[hidden]> wrote:
>
>
>>don't you think you'd better make it if(!is_log_enabled(app));else
>>app_log() << "testing" << i ...; just in case there is an if / else in the
>>neighborhood
>
>
> It is already implemented as you suggest. FWIW, I always thought the
> "right" way to do multi-line macros was to use do { /* stuff */ }
> while (0). I picked this up from the comp.lang.c FAQ if memory serves
> (http://www.eskimo.com/~scs/C-faq/q10.4.html)
Yeah, but in C++ the idiom is different: "do { /* stuff */ } while (false)".
:o)
Now seriously, I'm sure you meant "statements in sequence", not
"multi-line".
Andrei
P.S. Thanks for the help with flex_string, Caleb.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk