public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-4273] libstdc++: Fix custom clock in test
@ 2020-10-22 22:15 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-10-22 22:15 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-22 22:15 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:15 [gcc r11-4273] 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).