[libcxx-commits] [PATCH] D114912: [libc++] [P1614] Hidden-friend operator<=> for string_view.

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 3 08:49:44 PST 2021


jloser added inline comments.


================
Comment at: libcxx/include/string_view:716
+        using _Rp = __comp_cat_t<_Traits, weak_ordering>;
+        static_assert(__is_comparison_category_v<_Rp>, "Mandates: R denotes a comparison category type");
+        return __lhs.compare(__rhs) <=> 0;
----------------
Is the message more useful for developers //using libc++// or implementors? I suspect the former, in which case I would mention something about `traits​::​comparison_­category` rather than `R`. I claim `R` is not useful for developers as that requires them to look at the Standard to figure out `R` means `traits​::​comparison_­category`. WDYT?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114912/new/

https://reviews.llvm.org/D114912



More information about the libcxx-commits mailing list