Boost Users :
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-13 06:53:06
Jason Winnebeck wrote:
> Peter Dimov wrote:
>> shared_ptr has recently been accepted into the Library Technical
> Wow.. That's quite a read. The amount of work you Boost guys put into
> all of the subtle details is amazing. I found it quite interesting but
> what I was looking for was some rationale on not allowing comparing
> shared_ptr to NULL.
> Typically when I compare pointers, I often like to compare it like
> "if ( ptr != NULL )" explictly. I like this for three reasons:
> 1. It strongly shows that you are testing a pointer.
> 2. It reads better in terms of saying what you want.
> 3. I program in Java where it's required, so I'm in the habit ;).
General "minimal but complete" principles, I guess. It is much easier to add
a feature to a standard component at a later time than to take one away, and
we already have to support if( p ) for declarations in conditions to work.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net