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:

| >Why repeat twice the same tokens, especially when the difference is
| >only in the type of the argument?
| >
| >     template<class _Np>
| >       static _Np
| >       _S_minimum(_Np __x)
| >       {
| >          while (__x->_M_left != 0)
| >            __x = __x->_M_left;
| >          return __x;
| >       }
| >
| Personally I don't like this because it's less obvious what's

Personnally, I do like that because it exposes some type-safety
issues (I don't think they are serious however).  The above is no more
obscure that the duplications you're proposing.

-- Gaby


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