
20 May
2008
20 May
'08
1:34 p.m.
Hi, 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 directly? Thanks, Klaus Triendl