[libcxx-commits] [PATCH] D149832: [libc++][ranges] Implement the changes to `basic_string` from P1206 (`ranges::to`):

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 30 17:40:53 PDT 2023


var-const added inline comments.


================
Comment at: libcxx/include/string:1558
+#if _LIBCPP_STD_VER >= 23
+  template <_ContainerCompatibleRange<_CharT> _Range>
+  _LIBCPP_HIDE_FROM_ABI
----------------
ldionne wrote:
> I might have asked for that already, but do you have tests that these constraints are right, i.e. this overload doesn't match if you pass something that's not `_ContainerCompatibleRange`?
Yes, see `constexpr bool test_constraints_replace_with_range()` in `replace_with_range.pass.cpp`.


================
Comment at: libcxx/test/std/strings/basic.string/string.cons/from_range.pass.cpp:111
+int main(int, char**) {
+  for_all_iterators_and_allocators<char>([]<class Iter, class Sent, class Alloc>() {
+    // Shorter input -- SSO.
----------------
ldionne wrote:
> You don't seem to be testing this inside `constexpr`, but the constructor is definitely marked as `constexpr`. The same comment seems to apply to all tests.
Thanks! Sorry, somehow I missed that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149832



More information about the libcxx-commits mailing list