[time.duration.comparisons] (original) (raw)
30 Time library [time]
30.5 Class template duration [time.duration]
30.5.7 Comparisons [time.duration.comparisons]
In the function descriptions that follow, CT representscommon_type_t<A, B>, where A and B are the types of the two arguments to the function.
template<class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator==(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
Returns: CT(lhs).count() == CT(rhs).count().
template<class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator<(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
Returns: CT(lhs).count() < CT(rhs).count().
template<class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator>(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator<=(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator>=(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2> requires [three_way_comparable](cmp.concept#concept:three%5Fway%5Fcomparable "17.12.4 Concept three_way_comparable [cmp.concept]")<typename CT::rep> constexpr auto operator<=>(const duration<Rep1, Period1>& lhs,const duration<Rep2, Period2>& rhs);
Returns: CT(lhs).count() <=> CT(rhs).count().