Boost logo

Boost :

From: Maxim Yegorushkin (e-maxim_at_[hidden])
Date: 2004-10-29 04:26:34

Daniel Frey <daniel.frey_at_[hidden]> wrote:

>> logger("app.gui") << "something GUIsh";
>> Though I am not sure, if a compiler will be able to optimize checks
>> for every operator<<() to a single check for the entire output
>> expression.
> Now replace "something GUIsh" with anExpensiveFunction(). John's code
> will not evaluate it when the logger is disabled. OTOH your code will
> always evaluate it, which is IMHO not acceptable for a logging library.

Well, that is true, though my logging needs has never required calling any
expensive functions.

Maxim Yegorushkin

Boost list run by bdawes at, gregod at, cpdaniel at, john at