[libcxx-commits] [PATCH] D80891: [libcxx] adds consistent comparison for `basic_string_view`
Kent Ross via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 4 00:06:29 PDT 2021
mumbleskates added inline comments.
================
Comment at: libcxx/include/string_view:31
constexpr bool operator!=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) noexcept;
+ basic_string_view<charT, traits> y) noexcept; // C++17
template<class charT, class traits>
----------------
As I understand it, the functions for the operators {`<`,`<=`,`>=`,`>`,`!=`} are no longer supposed to be defined in C++20, and should always be synthesized from `<=>` and `==` by the compiler. That is, if we are defining `operator<=>` we should be doing it //instead of// the five non-`==` operators. Is there another reason these symbols still need to be defined?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80891/new/
https://reviews.llvm.org/D80891
More information about the libcxx-commits
mailing list