Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-10-08 06:24:38


Daniel Frey wrote:
>
> template< typename T, typename S > T& pointer_cast( S* const& p )
> {
> return *static_cast< T* >(
> static_cast< void* >(
> const_cast< typename ::boost::remove_cv< S >::type* >( p )
> )
> );
> }
>

Sorry, this should have been:

template< typename T, typename S > T& pointer_cast( S* const& p )
{
   return *static_cast< typename ::boost::remove_cv< T >::type* >(
     static_cast< void* >(
       const_cast< typename ::boost::remove_cv< S >::type* >( p )
     )
   );
}

...those details... sight...

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