[libcxx-commits] [PATCH] D128281: [libc++] fix views::all hard error on lvalue move only views instead of SFINAE

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 21 10:50:38 PDT 2022


jloser added inline comments.


================
Comment at: libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp:153
     static_assert(!std::is_invocable_v<decltype(std::views::all), RandomAccessRange, RandomAccessRange>);
+    static_assert(!std::is_invocable_v<decltype(std::views::all), MoveOnlyView&>);
   }
----------------
var-const wrote:
> Is it important for the view to be move-only? From the patch description, I got the impression that any reference should fail, but perhaps I'm missing something?
The call operator already requires the template type be a view, so an lvalue reference to a view is the simplest case to make it go boom AFAICT.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128281



More information about the libcxx-commits mailing list