Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-09-04 10:52:21

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. ;-)

Peter Dimov
Multi Media Ltd.

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