[libcxx-commits] [PATCH] D116346: [libc++] Fix bug #52902

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 30 09:00:54 PST 2021


Quuxplusone added a comment.

In D116346#3213932 <https://reviews.llvm.org/D116346#3213932>, @philnik wrote:

> In D116346#3212830 <https://reviews.llvm.org/D116346#3212830>, @Mordante wrote:
>
>> Since this fixes a bug I'd like to see a regression test. The fix itself seems correct.
>
> Where should I put that test?

+1, a test is a good idea. But IIUC, this is code which is not yet "active," in the sense that `string::begin` is not constexpr yet and so it's not really possible to get a std::string::iterator at constexpr time except by default-constructing one.
@philnik, can you go ahead and make `libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp` constexpr-friendly (presumably by extracting its diff from your larger constexpr-string patch)? And then expand it a little bit so that it also tests `operator=` in that same function. That seems like the right approach to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116346



More information about the libcxx-commits mailing list