Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-05-21 14:43:39

At 05:42 PM 3/29/2001, David Abrahams wrote:

>Ah, wonderful. We should put this riff in boost/utility.hpp
>template <class T>
>void delete_(T const volatile* x)
What is the rationale for the above CV qualifiers?

> sizeof(T);
I'm assuming we want this to be BOOST_STATIC_ASSERT(sizeof(T));

> delete x;
>Then "delete x" becomes boost::delete_(x)

I'm updating smart_ptr to enforce the new requirement that T must be a
complete type at the point of reset() or dtor instantiation.

Since the change has to be made in something like 8 places, I'd rather use
boost/utility.hpp functions, and so started to add them per Dave's
suggestion above.

But we really do need better names that delete_ and delete_array_.

Trust me, the trailing underscore will cause endless confusion. They will
get dropped by typo, by human editors who think they are typo's, etc.

So let's see if we can come up with something better:

     checked_delete & checked_array_delete
     ptr_delete & array_ptr_delete

Other suggestions appreciated.


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