Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-09-04 14:04:55


----- Original Message -----
From: Peter Dimov <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, September 04, 2001 12:52 PM
Subject: Re: [boost] Documenting non-copyable-ness (was: Re: Review:
Boost.Threads)

> From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> > > > Error prone (very subtle) because, as it was expressed, one can
manage
> > > both
> > > > classes through a noncopyable*.
> > >
> > > How do you acquire such a pointer?
> > >
> > Correct me if I'm wrong, but I thought Peter explained that a C cast
would
> > allow to acquire such a pointer.
>
> The C-style cast is only a problem when the class is documented to inherit
> from boost::noncopyable.
>
> When no such guarantee is made in the documentation of the class, the user
> can't assume that a C-style cast would "work"; it'd probably perform a
> reinterpret_cast, with predictable results. ;-)
>
I see.
It was proposed not to document this inheritance, so this should remove the
problem.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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