Boost logo

Boost :

From: klaus triendl (klaus_at_[hidden])
Date: 2008-05-20 09:34:10


I've just used a tribool and a null pointer together in an if-expression:

if (a_tribool || *a_bool_pointer)

leading to an access violation, because operator || is overloaded for
tribool and dereferencing the pointer occurs before calling operator ||
instead of short-circuiting the expression.

Is this by design and do I have to access the tribool's 'value' member

Klaus Triendl

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