Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-21 11:05:51

"Peter Dimov" <pdimov_at_[hidden]> writes:

> From: "David Abrahams" <dave_at_[hidden]>
>> Just the usual workaround here, I presume
>> template<class D, class T> D * get_deleter(shared_ptr<T> const & p, D* =
> 0)
>> ^^^^^^
>> {
>> return static_cast<D *>(p._internal_get_deleter(typeid(D)));
>> }
>> To allow usage which doesn't collide with class templates and prevent link
> problems.
> Ah, _that_ workaround. IIRC (been a while since I used MSVC 6) there will be
> no link problems with get_deleter. 'D' is mentioned in the return type, and
> the return type of the function _is_ included in the mangled name, although
> the template parameters are not.

Still, there's the issue of collision with class templates. You may
recall I recently got you to add a boost::type<X> parameter to the
bind or apply (I forget which) interface for that reason.

                       David Abrahams
   dave_at_[hidden] *
Boost support, enhancements, training, and commercial distribution

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