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]: Separate classes for constant iterators and miscellaneous optimizations


Gawain Bolton <gbolton@free.fr> writes:

| This patch introduces new classes for constant iterators for std::list
| and the _Rb_tree class which is used to implement the
| std::{multi}*{map|set} containers.
| 
| The reasons for doing this are:
| 
|     * code clarity/simplicity
|     * eliminate need for const_casts

I think we should aim at more code sharing than code duplication
targetting  const_cast<> eliminating.  "More codes" in headers means
potential increase in compile-time.  We also need to take that aspect
into account when working on "perfomance" or code "header washing".
As of container member functions accepting or not-accepting
const_iterator, there is a library DR regarding const-correctness.
The general sentiment is that const_iterator should be accepted in
more situations than is currently the case. 

-- Gaby


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