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:

| >|    template<typename _Val>
| >| @@ -149,13 +164,15 @@
| >|        const_iterator;
| >|        typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
| >|        typedef _Rb_tree_node<_Val>* _Link_type;
| >| +      typedef const _Rb_tree_node<_Val>* _const_Link_type;
| > |        |        _Rb_tree_iterator() {}
| >| -      _Rb_tree_iterator(_Rb_tree_node_base* __x) { _M_node = __x; }
| >| +      _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
| >
| >We should strive for member-initializer lists, where possible
| >
| I agree.  However, this is not possible because the member in question
| is in the parent _Rb_tree_base_iterator class.
| 
| I am working on another patch which removes the _Rb_tree_base_iterator
| class altogether and which would allow for this to be changed.

OK. Thanks,

-- Gaby


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