This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/60519] Debug mode should check comparators for irreflexivity


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.

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