Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-12-27 04:10:39

From: Darin Adler <darin_at_[hidden]>
> Something like the void* trick, or a null() or is_null() member function
> would be an improvement. I don't like:
> if (p.get())
> myself. Of course, I have a bigger hang-up about null pointers, as readers
> of this list may already know. I just can't stand the fact that:
> C* x;
> means that x points to an object of class C and you can use all the members
> declared in class C, unless it's 0, in which case you can't use *any* of the
> members declared in class C! It's just a gaping hole in the type system.

It's not that hard to create smart pointers that cannot be null.

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