Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-08-16 14:46:07

"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
>> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
>> > What's the difference in the generated object code?
>> Thorsten, the difference is in fragility over time with maintenance.
>> That's why the compiler issues the warning. Any decent beginner's
>> book on C++ will advise you to eschew all casts, and prefer the
>> new-style ones. Do you really need to have the fundamentals of good
>> C++ programming practice explained?
> no. I always use const_cast in my own code. so that is why I believe it
> might
> be there for a reason.
>> Incidentally, if you find that the proper C++ construct is "less
>> portable. somehow." you should use BOOST_WORKAROUND to isolate the
>> compiler for which it fails to work, if only so that the reason for
>> the workaround is documented.
> yes, in a perfect world.

?? It doesn't take much more effort than changing the code to use a
C-style cast.

> I can change it and then we can see if it breaks anything.

Sounds good to me.

Dave Abrahams
Boost Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at