[libcxx-commits] [PATCH] D120417: [libc++] [ranges] Regression test for decltype(auto) ranges::iter_move

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 23 08:55:04 PST 2022


Quuxplusone created this revision.
Quuxplusone added reviewers: philnik, ldionne, libc++, jwakely.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92894#c3
  https://reviews.llvm.org/D119589#inline-1151299

This is the test for the issue, IIUC. I expect this new test case to fail (only) on GCC 11. If I'm right and GCC 11 doesn't like it, then I volunteer to work on a fix for it. (And improve the `std::projected` tests while I'm at it.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120417

Files:
  libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp


Index: libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp
===================================================================
--- libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp
+++ libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp
@@ -23,6 +23,8 @@
 static_assert(std::same_as<decltype(*std::declval<IntPtr>()), int const&>);
 static_assert(std::same_as<std::iter_difference_t<IntPtr>, std::ptrdiff_t>);
 
+static_assert(std::same_as<std::iter_rvalue_reference_t<std::projected<int*, std::identity>>, int&&>);
+
 struct S { };
 
 using Cpp17InputIterator = std::projected<cpp17_input_iterator<S*>, int S::*>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120417.410838.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220223/c6d8c87e/attachment.bin>


More information about the libcxx-commits mailing list