[Patch] PR11504: -Wcast-qual and general constness issues with stl_tree.h

Gabriel Dos Reis gdr@integrable-solutions.net
Sat Jul 26 09:39:00 GMT 2003


Gawain Bolton <gbolton@free.fr> writes:

| Gabriel Dos Reis wrote:
| 
| >Gawain Bolton <gbolton@free.fr> 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'.

-- Gaby



More information about the Libstdc++ mailing list