
16 Sep
2008
16 Sep
'08
12:31 a.m.
Peter Dimov wrote:
Jon Biggar:
I wanted to get rid of all old-style casts in my application, so I turned on -Wold-style-cast in gcc and found a whole bunch of old-style casts in boost headers.
...
../../../boost/detail/sp_convertible.hpp:48: warning: use of old-style cast
(Y*)0 is so much nicer than static_cast< Y* >( 0 )... :-/
It is shorter, as are most uses of old-style casts as opposed to C++ new-style casts, but what makes it "nicer" ? To me a consistent syntax which makes casts more easily recognizable is "nicer", so I always consider new-style casts "nicer".