Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-07-18 11:32:20


Chris Uzdavinis wrote:
> Chris Uzdavinis <chris_at_[hidden]> writes:
>
>> Please consider this simple example:
> ...
>> #define LOG(X) log((X), __FILE, __LINE__)
>
> Oops. The typo on __FILE was an accident, and I hope it won't be a
> distraction from the example I was trying to make.

This is not a namespace-level macro. It expands to an expression. An
expression macro must not contain a trailing semicolon because it can be
used in contexts where a semicolon is illegal:

static int dummy = LOG(something), 1;


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