Boost logo

Boost :

From: Gary Powell (powellg_at_[hidden])
Date: 2002-01-15 19:02:37


>>
<snip>
I am therefore proposing it as an addition to Boost, and
will simply stuff it down to the bowels of boost::threads::detail::mac or
something if nobody else sees value in it.

Its purpose is to convert anything to anything, and it looks like this:

// force_cast will convert anything to anything.

template<class Return_Type, class Argument_Type>
inline Return_Type force_cast(const Argument_Type &rSrc)
    { return(*reinterpret_cast<const Return_Type *>(&rSrc)); }

<snip>
Is there any interest in this?
<<

Yep, I like it.

   Yours,
   -Gary-

powellg at amazon dot com


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