diff --git a/string.hpp b/string.hpp index a1bf4bbb..95077107 100644 --- a/string.hpp +++ b/string.hpp @@ -302,10 +302,9 @@ namespace cruft::string::compare { /// \tparam TransformV A character transform function template struct transform { - template bool operator() ( - ContainerT const &a, - ContainerT const &b + std::string_view const &a, + std::string_view const &b ) const noexcept { if (a.size () != b.size ()) return false; @@ -316,18 +315,6 @@ namespace cruft::string::compare { return true; } - - - template < - typename CharT, - typename = std::void_t< - typename std::char_traits::char_type - > - > - bool operator() (CharT const *a, CharT const *b) const noexcept - { - return (*this) (std::string_view (a), std::string_view (b)); - } }; using lower = transform; diff --git a/test/string.cpp b/test/string.cpp index fe33e714..f3b46959 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -210,15 +210,6 @@ void test_comparator_lower (cruft::TAP::logger &tap) for (auto const &t: TESTS) { tap.expect_eq (cmp (t.a, t.b), t.equal, "compare::lower, pointers, %!", t.message); - tap.expect_eq ( - cmp ( - cruft::view (t.a), - cruft::view (t.b) - ), - t.equal, - "compare::lower, views, %!", - t.message - ); } }