Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions source/time.tex
Original file line number Diff line number Diff line change
Expand Up @@ -770,32 +770,32 @@
const zoned_time<Duration, TimeZonePtr>& t);

// \ref{time.zone.leap}, leap second support
class leap;
class leap_second;

bool operator==(const leap& x, const leap& y);
strong_ordering operator<=>(const leap& x, const leap& y);
bool operator==(const leap_second& x, const leap_second& y);
strong_ordering operator<=>(const leap_second& x, const leap_second& y);

template<class Duration>
bool operator==(const leap& x, const sys_time<Duration>& y);
bool operator==(const leap_second& x, const sys_time<Duration>& y);
template<class Duration>
bool operator< (const leap& x, const sys_time<Duration>& y);
bool operator< (const leap_second& x, const sys_time<Duration>& y);
template<class Duration>
bool operator< (const sys_time<Duration>& x, const leap& y);
bool operator< (const sys_time<Duration>& x, const leap_second& y);
template<class Duration>
bool operator> (const leap& x, const sys_time<Duration>& y);
bool operator> (const leap_second& x, const sys_time<Duration>& y);
template<class Duration>
bool operator> (const sys_time<Duration>& x, const leap& y);
bool operator> (const sys_time<Duration>& x, const leap_second& y);
template<class Duration>
bool operator<=(const leap& x, const sys_time<Duration>& y);
bool operator<=(const leap_second& x, const sys_time<Duration>& y);
template<class Duration>
bool operator<=(const sys_time<Duration>& x, const leap& y);
bool operator<=(const sys_time<Duration>& x, const leap_second& y);
template<class Duration>
bool operator>=(const leap& x, const sys_time<Duration>& y);
bool operator>=(const leap_second& x, const sys_time<Duration>& y);
template<class Duration>
bool operator>=(const sys_time<Duration>& x, const leap& y);
bool operator>=(const sys_time<Duration>& x, const leap_second& y);
template<class Duration>
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
constexpr auto operator<=>(const leap& x, const sys_time<Duration>& y);
constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y);

// \ref{time.zone.link}, class \tcode{link}
class link;
Expand Down Expand Up @@ -8710,10 +8710,10 @@
\begin{codeblock}
namespace std::chrono {
struct tzdb {
string version;
vector<time_zone> zones;
vector<link> links;
vector<leap> leaps;
string version;
vector<time_zone> zones;
vector<link> links;
vector<leap_second> leap_seconds;

const time_zone* locate_zone(string_view tz_name) const;
const time_zone* current_zone() const;
Expand Down Expand Up @@ -10090,17 +10090,17 @@
\tcode{os}.
\end{itemdescr}

\rSec2[time.zone.leap]{Class \tcode{leap}}
\rSec2[time.zone.leap]{Class \tcode{leap_second}}

\rSec3[time.zone.leap.overview]{Overview}
\indexlibraryglobal{leap}
\indexlibraryglobal{leap_second}

\begin{codeblock}
namespace std::chrono {
class leap {
class leap_second {
public:
leap(const leap&) = default;
leap& operator=(const leap&) = default;
leap_second(const leap_second&) = default;
leap_second& operator=(const leap_second&) = default;

// unspecified additional constructors

Expand All @@ -10111,14 +10111,14 @@
\end{codeblock}

\pnum
Objects of type \tcode{leap} representing
Objects of type \tcode{leap_second} representing
the date and value of the leap second insertions
are constructed and stored in the time zone database when initialized.

\pnum
\begin{example}
\begin{codeblock}
for (auto& l : get_tzdb().leaps)
for (auto& l : get_tzdb().leap_seconds)
if (l <= 2018y/March/17d)
cout << l.date() << ": " << l.value() << '\n';
\end{codeblock}
Expand Down Expand Up @@ -10158,7 +10158,7 @@

\rSec3[time.zone.leap.members]{Member functions}

\indexlibrarymember{date}{leap}%
\indexlibrarymember{date}{leap_second}%
\begin{itemdecl}
constexpr sys_seconds date() const noexcept;
\end{itemdecl}
Expand All @@ -10169,7 +10169,7 @@
The date and time at which the leap second was inserted.
\end{itemdescr}

\indexlibrarymember{value}{leap}%
\indexlibrarymember{value}{leap_second}%
\begin{itemdecl}
constexpr seconds value() const noexcept;
\end{itemdecl}
Expand All @@ -10186,9 +10186,9 @@

\rSec3[time.zone.leap.nonmembers]{Non-member functions}

\indexlibrarymember{operator==}{leap}%
\indexlibrarymember{operator==}{leap_second}%
\begin{itemdecl}
constexpr bool operator==(const leap& x, const leap& y) noexcept;
constexpr bool operator==(const leap_second& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10197,9 +10197,9 @@
\tcode{x.date() == y.date()}.
\end{itemdescr}

\indexlibrarymember{operator<=>}{leap}%
\indexlibrarymember{operator<=>}{leap_second}%
\begin{itemdecl}
constexpr strong_ordering operator<=>(const leap& x, const leap& y) noexcept;
constexpr strong_ordering operator<=>(const leap_second& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10208,11 +10208,11 @@
\tcode{x.date() <=> y.date()}.
\end{itemdescr}

\indexlibrarymember{operator==}{leap}%
\indexlibrarymember{operator==}{leap_second}%
\indexlibrarymember{operator==}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator==(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr bool operator==(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10221,11 +10221,11 @@
\tcode{x.date() == y}.
\end{itemdescr}

\indexlibrarymember{operator<}{leap}%
\indexlibrarymember{operator<}{leap_second}%
\indexlibrarymember{operator<}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator<(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr bool operator<(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10234,11 +10234,11 @@
\tcode{x.date() < y}.
\end{itemdescr}

\indexlibrarymember{operator<}{leap}%
\indexlibrarymember{operator<}{leap_second}%
\indexlibrarymember{operator<}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator<(const sys_time<Duration>& x, const leap& y) noexcept;
constexpr bool operator<(const sys_time<Duration>& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10247,11 +10247,11 @@
\tcode{x < y.date()}.
\end{itemdescr}

\indexlibrarymember{operator>}{leap}%
\indexlibrarymember{operator>}{leap_second}%
\indexlibrarymember{operator>}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator>(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr bool operator>(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10260,11 +10260,11 @@
\tcode{y < x}.
\end{itemdescr}

\indexlibrarymember{operator>}{leap}%
\indexlibrarymember{operator>}{leap_second}%
\indexlibrarymember{operator>}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator>(const sys_time<Duration>& x, const leap& y) noexcept;
constexpr bool operator>(const sys_time<Duration>& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10273,11 +10273,11 @@
\tcode{y < x}.
\end{itemdescr}

\indexlibrarymember{operator<=}{leap}%
\indexlibrarymember{operator<=}{leap_second}%
\indexlibrarymember{operator<=}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator<=(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr bool operator<=(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10286,11 +10286,11 @@
\tcode{!(y < x)}.
\end{itemdescr}

\indexlibrarymember{operator<=}{leap}%
\indexlibrarymember{operator<=}{leap_second}%
\indexlibrarymember{operator<=}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator<=(const sys_time<Duration>& x, const leap& y) noexcept;
constexpr bool operator<=(const sys_time<Duration>& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10299,11 +10299,11 @@
\tcode{!(y < x)}.
\end{itemdescr}

\indexlibrarymember{operator>=}{leap}%
\indexlibrarymember{operator>=}{leap_second}%
\indexlibrarymember{operator>=}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator>=(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr bool operator>=(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10312,11 +10312,11 @@
\tcode{!(x < y)}.
\end{itemdescr}

\indexlibrarymember{operator>=}{leap}%
\indexlibrarymember{operator>=}{leap_second}%
\indexlibrarymember{operator>=}{sys_time}%
\begin{itemdecl}
template<class Duration>
constexpr bool operator>=(const sys_time<Duration>& x, const leap& y) noexcept;
constexpr bool operator>=(const sys_time<Duration>& x, const leap_second& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -10325,12 +10325,12 @@
\tcode{!(x < y)}.
\end{itemdescr}

\indexlibrarymember{operator<=>}{leap}%
\indexlibrarymember{operator<=>}{leap_second}%
\indexlibrarymember{operator<=>}{sys_time}%
\begin{itemdecl}
template<class Duration>
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
constexpr auto operator<=>(const leap& x, const sys_time<Duration>& y) noexcept;
constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y) noexcept;
\end{itemdecl}

\begin{itemdescr}
Expand Down