File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ class duration;
3232template <class _Clock , class _Duration >
3333class time_point ;
3434
35+ // Helper to check that _Tp::time_point has the form time_point<_, typename _Tp::duration>.
36+ template <class _TimePoint , class _ClockType >
37+ constexpr bool __is_valid_clock_time_point_v = false ;
38+
39+ template <class _TimePointClock , class _ClockType >
40+ constexpr bool __is_valid_clock_time_point_v<time_point<_TimePointClock, typename _ClockType::duration>, _ClockType> =
41+ true ;
42+
3543// Check if a clock satisfies the Cpp17Clock requirements as defined in [time.clock.req]
3644template <class _Tp >
3745_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_clock_v = requires {
@@ -45,7 +53,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_clock_v = requires {
4553 requires _IsSame<typename _Tp::duration, duration<typename _Tp::rep, typename _Tp::period>>::value;
4654
4755 typename _Tp::time_point;
48- requires _IsSame <typename _Tp::time_point::duration, typename _Tp::duration>::value ;
56+ requires __is_valid_clock_time_point_v <typename _Tp::time_point, _Tp> ;
4957
5058 _Tp::is_steady;
5159 requires _IsSame<decltype (_Tp::is_steady), const bool >::value;
You can’t perform that action at this time.
0 commit comments