This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]