Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-08 14:44:27

From: "David B. Held" <dheld_at_[hidden]>
> > > I'd like to use the detail::*_cast_tags without creating my own and
> > > without having a dependency on shared_ptr<>.
> >
> > The tags are really only an implementation detail. We can move them to -
> > say - detail/cast_tags.hpp but why should different smart pointers use
> > same tag classes?
> > [...]
> They don't need to necessarily. It's just convenient. It seems that the
> casting operations should be pointer-independent (possibly with
> overloads for raw pointers). Then, any custom pointer type could simply
> overload boost::sp_*_cast<>, and code that uses those casts can drop-in
> replace raw or smart pointer types.

This has been my intention.

> So I see the tag classes as an
> implementation detail to the end user, but an interface detail for library
> writers. Of course, there's nothing wrong with making different cast
> tags, but since those are perfectly good names, why make new ones?
> I'd rather share. ;)

OK, I'll rename the tags in shared_ptr.hpp to shared_*_cast_tag to free the
perfectly good names for public consumption. :-)

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