Moin Moin.
> "Michael Soliman" <msoliman@intera.de> writes:
>
> | > T_mesh& asLeaf() { return
static_cast<T_mesh&>
> | (*this); }
> | My question being: Should this be a reinterpret_cast or not, and, if
so,
> | why.
>
> Hi,
>
> static_cast<> is just fine.
>
> reinterpret_cast<> is actually when you want to perform a non-portable
> cast, using an implementation defined definition for. the result
>
> Among all new-style casts, reinterpret_cast<> is the worst.
Ok. I know. But a year ago or so, I got an Intel-support-answer, telling me
as an answer to a compiler-error:
However, a change is also required in your code.
The static_cast should actually be a reinterpret_cast.
static_cast cannot transfer const qualifiers on template
types according to the ANSI standard, so this change needed to be
make.
.
As (along with a compiler-update they sent immediately 8^) ) it solved the
problem, I accepted it.
But, right now, it would be nice to have some sort of a definition, saying
when exactly I need to use it.
Tschuess,
Michael.
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:16 EST