Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-22 08:35:13


From: "Douglas Gregor" <gregod_at_[hidden]>
> On Tuesday 21 January 2003 04:24 pm, David Abrahams wrote:
> > Unai Uribarri <unaiur_at_[hidden]> writes:
> > > Currently, any_cast doesn't allow to cast to
> > > references. Instead, you have obscure castings from
> > > any* to T returning T*.
> >
> > That sounds like a design mistake on the face of it.
>
> This comment has come up before, and everyone seems to agree that we'd
prefer
> the semantics that Unai proposes. I think the only reason that we haven't
> changed the semantics is that we don't want to change Kevlin's design
without
> hearing the reasons for the existing design.

The pointer cast returns NULL on failure, the value cast throws
bad_any_cast.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk