namespace std::chrono {
class leap {
public:
leap(const leap&) = default;
leap& operator=(const leap&) = default;
// unspecified additional constructors
constexpr sys_seconds date() const noexcept;
};
}
for (auto& l : get_tzdb().leaps) if (l <= 2018y/March/17d) cout << l.date() << '\n';
1972-07-01 00:00:00 1973-01-01 00:00:00 1974-01-01 00:00:00 1975-01-01 00:00:00 1976-01-01 00:00:00 1977-01-01 00:00:00 1978-01-01 00:00:00 1979-01-01 00:00:00 1980-01-01 00:00:00 1981-07-01 00:00:00 1982-07-01 00:00:00 1983-07-01 00:00:00 1985-07-01 00:00:00 1988-01-01 00:00:00 1990-01-01 00:00:00 1991-01-01 00:00:00 1992-07-01 00:00:00 1993-07-01 00:00:00 1994-07-01 00:00:00 1996-01-01 00:00:00 1997-07-01 00:00:00 1999-01-01 00:00:00 2006-01-01 00:00:00 2009-01-01 00:00:00 2012-07-01 00:00:00 2015-07-01 00:00:00 2017-01-01 00:00:00— end example
constexpr bool operator==(const leap& x, const leap& y) noexcept;
constexpr bool operator<(const leap& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator==(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator==(const sys_time<Duration>& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator!=(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator!=(const sys_time<Duration>& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator<(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator<(const sys_time<Duration>& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator>(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator>(const sys_time<Duration>& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator<=(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator<=(const sys_time<Duration>& x, const leap& y) noexcept;
template<class Duration>
constexpr bool operator>=(const leap& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator>=(const sys_time<Duration>& x, const leap& y) noexcept;