Patch: stl_tree.h

Dhruv Matani dhruvbird@gmx.net
Thu Apr 15 02:36:00 GMT 2004


Hello,
	This is a patch for stl_tree.h, which makes the _M_key_compare data
member s function, so that the specialization of _M_impl for PODs can be
used correctly.

I have attached another test, which shows the difference between the
sizes when used with a function comparator.

-- 
        -Dhruv Matani.
http://www.geocities.com/dhruvbird/

Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.stl_tree.dhruv_15042004
Type: text/x-patch
Size: 16707 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040415/df966be3/attachment.bin>
-------------- next part --------------
2004-04-02  Dhruv Matani  <dhruvbird@gmx.net>
	
	* include/bits/stl_tree.h: Changed the _M_key_compare member to a
	function, so that the _M_impl's member can be accessed with equal
	ease for either the normal version, or the specialization for
	PODs. This reduces the size of the red-black tree by 4-bytes for
	optimizable struct comparators.
	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: const_map_test.cpp
Type: text/x-c++
Size: 1078 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040415/df966be3/attachment-0001.bin>


More information about the Libstdc++ mailing list