Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-01-03 09:39:36

From: Dave Abrahams <abrahams_at_[hidden]>
> From: Beman Dawes <beman_at_[hidden]>
> ...
> > This thread ran on so long I can't remember if anyone suggested
> > adding an is_null() member. Seems like that would be clearer than
> > adding an operator! member. I can't see asking people to write "if
> > (!!p)" to test for non-null. "if (!p.is_null())" is not quite as
> > likely to be misread or miswritten.
> How about a free function in boost:: which was also specialized for
> std::auto_ptr and for raw pointers? That would allow some generic
> programming which would otherwise be impossible.

My preference remains just using the optional conversion to
pointer shared_ptr already has. I never did like that this
is not the default option.

A free function would be fine too, but I don't much like the
member function. I like operator! or operator bool even less.

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