[libcxx-commits] [PATCH] D80895: [libcxx] adds operator<=> for basic_string
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 3 06:00:21 PDT 2020
curdeius added inline comments.
================
Comment at: libcxx/include/string:414
-template<class charT, class traits, class Allocator>
+template<class charT, class traits, class Allocator> (Until C++17)
bool operator>=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
----------------
Shouldn't notes like "(Until C++17)" be just trailing comments?
================
Comment at: libcxx/test/std/strings/basic.string/string.nonmembers/string_opcmp/pointer_string.pass.cpp:35
+ typedef std::string S;
+ test("", S(""), std::strong_ordering::equal);
+ test("", S("abcde"), std::strong_ordering::less);
----------------
I may be missing something, but it seems that there are no tests for the basic cases like:
"abc" < "acb"
"cba" > "aaa"
All (non-equal) tests fall into the shorter/longer check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80895/new/
https://reviews.llvm.org/D80895
More information about the libcxx-commits
mailing list