From 0a74a0e1a2d4668613bd5913a600ab644402cefd Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 22 Oct 2020 20:28:10 +0100 Subject: [PATCH] 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. --- .../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 c86ca2c..307dccd 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::rep; - using period = std::chrono::duration::period; - using time_point = std::chrono::time_point>; + using duration = std::chrono::duration; + using rep = duration::rep; + using period = duration::period; + using time_point + = std::chrono::time_point; static constexpr bool is_steady = true; static const std::chrono::steady_clock::time_point epoch; -- 2.7.4