Jason Winnebeck wrote:
Peter Dimov wrote:
shared_ptr has recently been accepted into the Library Technical Report:
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.