Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2003-04-27 22:08:06

"Tanton Gibbs" <thgibbs_at_[hidden]> wrote in message
> Enforce(cout) << Enforce(MakeWidget())->ToString();
> I would think that the compiler could optimize away the Enforce calls with
> NDEBUG defined, but when not defined it will catch NULL derefs as the
> intended.

Oops, it looks like a presentation mistake on my part; ENFORCE is intended
to be enabled at all times and not depend on NDEBUG. ENFORCE checks error
conditions that are intended to be shown to the user, not those that check
the application invariants.


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