[libcxx-commits] [libcxx] WIP [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (PR #193891)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 20 05:45:03 PDT 2026


================
@@ -82,7 +81,10 @@ constexpr bool test() {
     using MoveOnlyElemIter =
         std::ranges::iterator_t<std::ranges::elements_view<std::ranges::subrange<MoveOnlyIter, Sent>, 0>>;
 
----------------
Zingam wrote:

Some tests are relying on these these constructors being public. Updates are necessary to restore the tests after making these constructors private.

> Also, I don't think this PR should be of WIP status for so long. IIUC we just need to add some `static_assert(!std::is_constructible_v<...>);` and possibly `static_assert(!std::is_convertible_v<...>);` to verify that we've achieved (some aspects of) the intent of P3059R2.

That's a good point.

https://github.com/llvm/llvm-project/pull/193891


More information about the libcxx-commits mailing list