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] |
This makes the searchers use the same optimization for std::byte as for narrow character types, and also uses it when the predicate is std::equal_to<C> rather than the default std::equal_to<void>. I wanted to call the new trait __is_byte_size, for pun value, but it isn't true for everything with size 1, because user-defined enumeration types could have weird equality semantics that would mean the optimization isn't valid. PR libstdc++/83607 * include/std/functional (__is_byte_like): New trait. (__is_std_equal_to): Remove. (__boyer_moore_base_t): Use __is_byte_like instead of __is_std_equal_to. * include/experimental/functional (__is_std_equal_to): Remove. (__boyer_moore_base_t): Use __is_byte_like instead of __is_std_equal_to. * testsuite/20_util/function_objects/83607.cc: New test. Tested powerpc64le-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |