This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/83607] std::boyer_moore_searcher is slow searching through arrays of std::byte
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Dec 2017 09:54:20 +0000
- Subject: [Bug libstdc++/83607] std::boyer_moore_searcher is slow searching through arrays of std::byte
- Auto-submitted: auto-generated
- References: <bug-83607-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83607
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No, because not all enumeration types behave like the integers:
enum E : unsigned char { };
namespace std {
template<> struct equal_to<E> {
bool operator()(E l, E r) const noexcept {
return ((unsigned)l % 16) == ((unsigned)r % 16);
}
};
}