
25 Apr
2005
25 Apr
'05
9:58 p.m.
Caleb Epstein wrote:
On 4/25/05, Victor A. Wagner Jr. <vawjr@rudbek.com> 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.