From: Jonathan Wakely Date: Thu, 22 Oct 2020 19:28:10 +0000 (+0100) Subject: libstdc++: Fix custom clock in test X-Git-Tag: upstream/12.2.0~12681 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a74a0e1a2d4668613bd5913a600ab644402cefd;p=platform%2Fupstream%2Fgcc.git 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 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;