[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 11:32:00 PDT 2024


================
@@ -30,98 +30,27 @@ class basic_string_view {
   constexpr basic_string_view &operator=(const basic_string_view &) {}
 };
 
-template <typename CharT>
-constexpr bool operator<(basic_string_view<CharT>, basic_string_view<CharT>) {
-  return {};
-}
-template <typename CharT>
-constexpr bool operator<(type_identity_t<basic_string_view<CharT>>,
-                         basic_string_view<CharT>) {
-  return {};
-}
-template <typename CharT>
-constexpr bool operator<(basic_string_view<CharT>,
-                         type_identity_t<basic_string_view<CharT>>) {
-  return {};
-}
----------------
zygoloid wrote:

Does this no longer work? I worry that this may have been taken pretty directly from a standard library implementation, so breaking it could be a problem!

https://github.com/llvm/llvm-project/pull/100692


More information about the cfe-commits mailing list