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-4273] libstdc++: Fix custom clock in test
Date: Thu, 22 Oct 2020 22:15:30 +0000 (GMT)	[thread overview]
Message-ID: <20201022221530.60CF8386F001@sourceware.org> (raw)

https://gcc.gnu.org/g:0a74a0e1a2d4668613bd5913a600ab644402cefd

commit r11-4273-g0a74a0e1a2d4668613bd5913a600ab644402cefd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Oct 22 20:28:10 2020 +0100

    libstdc++: Fix custom clock in test
    
    This test fails in C++20 mode because std::is_clock is false for the
    test clock, because it doesn't define a duration member.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/30_threads/condition_variable/members/68519.cc:
            Define recent_epoch_float_clock::duration to meet the Cpp17Clock
            requirements.

Diff:
---
 .../testsuite/30_threads/condition_variable/members/68519.cc     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
index c86ca2ccdbf..307dccd7183 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
@@ -47,10 +47,11 @@ test_wait_for()
 // needs to use a more recent epoch.
 struct recent_epoch_float_clock
 {
-  using rep = std::chrono::duration<float>::rep;
-  using period = std::chrono::duration<float>::period;
-  using time_point = std::chrono::time_point<recent_epoch_float_clock,
-    std::chrono::duration<float>>;
+  using duration = std::chrono::duration<float>;
+  using rep = duration::rep;
+  using period = duration::period;
+  using time_point
+    = std::chrono::time_point<recent_epoch_float_clock, duration>;
   static constexpr bool is_steady = true;
 
   static const std::chrono::steady_clock::time_point epoch;


                 reply	other threads:[~2020-10-22 22:15 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=20201022221530.60CF8386F001@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).