Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-03-17 17:17:11

Hi all,

Some time ago, somebody raised the issue about implicit casts. And I
liked the idea very much. But since then the conversation died out and
nothing happened.

The idea was that the implicit casts like:

  operator T*() const throw() { return ptr; }

be replaced with:

  operator void*() const throw() { return ptr; }

The reason is that such a pointer can be checked for NULLness, can be
assigned to other void*'s, but cannot be dereferenced by accident. In
addition, it will make all our smart pointers nicer, because the
BOOST_SMART_PTR_CONVERSION define will be a non-issue any more.

I have not heard any strong voices against this, so unless somebody has
a good argument against, I would like to propose this change to all our
smart pointers.



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