Boost logo

Boost Users :

From: Bronek Kozicki (brok_at_[hidden])
Date: 2005-06-29 11:34:29


Dave Steffen <dgsteffen_at_[hidden]> wrote:
> #define FOO(T) \

#define FOO do{/* here goes your macro */} while(0)

> Is anyone aware of a way to silence the "extra ;" errors? (I've

semicolon is required after "while(0)", thus compiler will no complain
any longer if you put whole macro inside "do{...} while(0)" block, as
shown above. It's very old trick, actually ...

B.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net