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]

REC: Optimization for stl_tree.h


I'd like to know the opinion of the implementors of rb_tree and
otherwise on the likelyhood of the following being conformant, and being
accepted if done:

Create 2 base classes: (A) _Rb_tree_node_alloc_base and (B)
_Rb_tree_count_cmp_base each having the responsibility of maintaining:

	(A)_Rb_tree_node_alloc_base: _Rb_tree_node_base and derives from the
allocator, and:
	(B)_Rb_tree_count_cmp_base: _M_node_count and derives from
_M_key_compare.

Because the comparison function would most likely be empty as well.

At first sight, it looks a bit ugly to me, but it has its benefits.


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




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