This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: pb_ds debug patch ?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: FranÃois Dumont <francois dot cppdevs at free dot fr>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 7 Mar 2011 16:15:29 -0800
- Subject: Re: pb_ds debug patch ?
- References: <4D753BD6.8040604@free.fr>
> While working on libstdc++ I experiment a regression in usage of
> pb_ds priority_queue. To find out what was wrong I made some
> modifications in debug mode of this type to have the
> binary_heap_::assert_valid method report the file:line where the
> assert_valid is invoked and not always a line in the method
> implementation code. As most of methods are using a assert_valid
> after enter and an other before exit it helps me detect exactly after
> what code the data structure got corrupted.
I like what you've done here. This is useful for debugging.
> Here is the patch. Now that I found my regression should I
> revert those modifications or are you interested in me generalizing
> this approach to other priority_queue data structure policies and
> submit a final patch ? If so tell me if new macro names are ok with
> you ?
Generalizing sounds good. The new macro names look fine to me.
-benjamin