[libcxx-commits] [PATCH] D141699: [libc++][ranges] Implement P2474R2(`views::repeat`).

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 5 04:33:56 PST 2023


philnik added inline comments.


================
Comment at: libcxx/include/__ranges/repeat_view.h:111
+      : __value_(std::in_place, std::ranges::__repeat_view_make_from_tuple<_Tp>(std::move(__value_args))),
+        __bound_(std::ranges::__repeat_view_make_from_tuple<_Bound>(std::move(__bound_args))) {}
+
----------------
yronglin wrote:
> philnik wrote:
> > Why not simply use `std::make_from_tuple`?
> `__repeat_view_make_from_tuple` still is a workaround for older version clang (https://godbolt.org/z/dreT87G4f). as far as I know, `std::make_from_tuple` initializing aggregates from a parenthesized list of values( https://github.com/llvm/llvm-project/blob/c0b4ca107a3b605f810bd60642907e6a77f7c6d3/libcxx/include/tuple#L1835 ), but this code requires P0960
Looking at your example, this doesn't seem like something that's specific to `repeat_view`. I'd just remove the workarounds and XFAIL the tests that don't work. The extra amount of code to make this work really isn't worth the LLVM15 support, which almost nobody uses anyways.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141699



More information about the libcxx-commits mailing list