public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-7802] libstdc++: Improve test for views::reverse
Date: Tue, 23 Mar 2021 18:24:52 +0000 (GMT)	[thread overview]
Message-ID: <20210323182452.3F1FE3858002@sourceware.org> (raw)

https://gcc.gnu.org/g:d1aa5f57db7c14a62e9b7e2a2aa8a9c402a89363

commit r11-7802-gd1aa5f57db7c14a62e9b7e2a2aa8a9c402a89363
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Mar 23 18:22:18 2021 +0000

    libstdc++: Improve test for views::reverse
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/std/ranges/adaptors/reverse.cc: Replace duplicated
            line with a check that uses the const being/end overloads.

Diff:
---
 libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
index 47386575192..0d52498e207 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
@@ -141,11 +141,12 @@ namespace test_ns
 void test06()
 {
   // Check that views::reverse works and does not use ADL which could lead
-  // to accidentally finding test_ns::make_reverse_iterator(const A&).
+  // to accidentally finding test_ns::make_reverse_iterator(A*).
   test_ns::A as[] = {{}, {}};
   auto v = as | std::views::reverse;
-  static_assert(std::ranges::view<decltype(v)>);
-  static_assert(std::ranges::view<decltype(v)>);
+  using V = decltype(v);
+  static_assert( std::ranges::view<V> );
+  static_assert( std::ranges::range<const V> );
 }
 
 int


                 reply	other threads:[~2021-03-23 18:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210323182452.3F1FE3858002@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).