[Patch]: libstdc++/PR11504 + constness and casting clean up

Gawain Bolton gbolton@free.fr
Sun Jul 27 12:50:00 GMT 2003


Ok, after spending more time than I care to admit I've prepared another 
patch which solves libstdc++/PR11504 and cleans up the constness and 
casting done in stl_tree.h

Again, all C-style casts have been replaced with C++ style casts.  
Changes were made where required to avoid casting away constness.  With 
this patch only static_casts and a single const_cast are done in the 
stl_tree.h header file.

This patch also removes the _Rb_tree_base_iterator class to simplify the 
_Rb_tree_iterator class and allow its constructors to use member 
initialization lists.

The debugging function __black_count() has been renamed 
_Rb_tree_black_count() and is no longer an inline function.

I'm also pleased to annonce this patch has nice symmetry.  Adding the 
_M_begin() function in fact increases the symmetry of the code with the 
existing _M_end() function.

Tested with std::set, std::multiset, std::map and std::multimap on 
i686-pc-linux-gnu with compile flags "-Wall -W -Wcast-align -Wcast-qual" 
and gcc version 3.4 20030702 (experimental).

Cheers,

Gawain

-- 
Gawain Bolton
Coignieres, France
PGP Info: Key server: http://wwwkeys.pgp.net
          Key id: 6EBEDEA6
          Fingerprint: 65C0 0030 21D1 7A01 546A  E7DB D60F 47E0 6EBE DEA6

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libstdc++_pr11504_patch.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030727/2f6cb42f/attachment.txt>


More information about the Libstdc++ mailing list