[libcxx-commits] [PATCH] D131322: [libc++] Fixes string_view comparison operators.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 10 10:31:19 PDT 2022


Mordante marked 2 inline comments as done.
Mordante added a comment.

Thanks for the reviews!



================
Comment at: libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp:35
+
+  static size_t length(const char_wrapper* a) { return std::strlen(reinterpret_cast<const char*>(a)); }
+
----------------
philnik wrote:
> You didn't have to keep my quick-n-diry implementation, but I guess it should be fine. Maybe add a `static_assert(sizeof(char_wrapper) == 1)` for my sanity? Unless it's guaranteed by the standard. In that case I'd be interested where that is guaranteed.
I'm sure it's guaranteed by the Standard, just not sure where ;-) But I'll add a `static_assert`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131322



More information about the libcxx-commits mailing list