Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-10-09 03:51:13


Daniel Frey wrote:
>
> I haven't followed the discussion closely, so please forgive if this has
> been suggested before or if I misunderstood the problem. You want ptr< T
> > to be usable as a ptr< const T >? What about:
>
> template< typename T > class ptr
> {
> ...
>
> public:
> operator const ptr< const T >&() const
> {
> [Bad ugly reinterpret_cast-version snipped]
> [Insert your favorite static_cast-version here :)]
> }
>
> ...
> };

I'm interested to hear whether this solves the original problem. If it
doesn't, please let me know, as this would mean that my own
pointer-classes might have an unsolved problem, too. :)

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

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