pb_ds debug patch ?
Benjamin Kosnik
bkoz@redhat.com
Tue Mar 8 00:15:00 GMT 2011
> 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
More information about the Libstdc++
mailing list