This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60519] Debug mode should check comparators for irreflexivity
- From: "fdumont at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 12 Apr 2015 19:57:38 +0000
- Subject: [Bug libstdc++/60519] Debug mode should check comparators for irreflexivity
- Auto-submitted: auto-generated
- References: <bug-60519-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60519
--- Comment #2 from FranÃois Dumont <fdumont at gcc dot gnu.org> ---
Created attachment 35305
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35305&action=edit
Strict weak ordering debug check patch
On my side here what I had plan to do. This patch rely on additional feature in
the _Formatter type to pass a type or iterator value_type to point the user to
the invalid operator or functor. It also do not perform the check if the
comparator is not able to handle it.
So yes it doubles the number of comparisons which is definitely a performance
hint but your patch on the other hand expect to detect an implementation issue
on only 1 use case so it can miss many kind of wrong implementation on special
instances.