This is the mail archive of the
mailing list for the libstdc++ project.
Re: [Patch] PR11504: -Wcast-qual and general constness issues with stl_tree.h
Gawain Bolton <email@example.com> writes:
| Gabriel Dos Reis wrote:
| >Gawain Bolton <firstname.lastname@example.org> writes:
| >| 1. I do not like the lack of symmetry with the casts for const vs.
| >| non-const functions.
| >| Non-const versions often require a reinterpret_cast whereas const
| >| versions can use static_cast.
| >Use of reinterpret_cast is a red alert.
| Let's put this in perspective. All C-style casts were replaced, in
| some cases with reinterpret_cast where required.
The point of my message is precisely that, there should not be a
reinterpret_cast<> in the first place -- whether spelled with a
C-style cast or with the keyword 'reinterpret_cast'.