|
Boost : |
From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-05-08 08:13:32
In addition to the safe bool included in the latest CVS version,
shared_ptr<> supports operator !.
Whenever a given class supports operator ! for boolan testing, you can
always use the 'double bang' idiom for testing 'true':
instead of: if (p) ...
write: if ( !! p ) ...
Using this, of course, might be contrary to the user's religion :-) since
it looks akward to the unaware eye; but it can be handy to know about it.
Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk