* [committed] libstdc++: Fix custom clock in test
@ 2020-10-22 22:19 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-10-22 22:19 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
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.
Tested powerpc64le-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1499 bytes --]
commit 0a74a0e1a2d4668613bd5913a600ab644402cefd
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Oct 22 20:28:10 2020
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 --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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-22 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 22:19 [committed] libstdc++: Fix custom clock in test Jonathan Wakely
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).