Skip to content

Commit 4f87609

Browse files
committed
P0355R7 Extending <chrono> to Calendars and Time Zones
Notable changes: * Reordered synopsis to match detailed description. * Significant changes to stable names, per style guide. * Added missing zoned_traits to <chrono> synopsis. * Removed redundant chrono:: qualification in synopsis. * [time.duration.io] Significant wording changes for comprehensibility. * Adjusted return type of clock_cast in synopsis to match that in detailed description. * Added subheadings to clock_cast description, replacing line comments in the middle of the wording. * Adjusted specification of clock_cast to avoid awkward "at least one of [...] exactly one of" construction and to avoid references to bullet numbers in the body text. * Reordered parsing and formatting sections to the end. * Removed descriptions for operator!=, operator>, operator<=, operator>= that are covered by [operators] * Removed some tutorial front-matter and design discussion from "day", "month", "year", "weekday", etc. * operator-(month, month), operator-(weekday, weekday): specify returned value in Returns: element rather than splitting the spec across Returns: and Remarks:. * Added subheadings for the new classes to separate member and non-member function descriptions, removed "class::" from member descriptions, added namespace std::chrono around class definitions. * Modified time_of_day examples to include sample code producing the given output * Removed exposition-only members tzdb::next and tzdb_list::head_ that are not actually used in the exposition. * Modified leap-second example to not require updates each time a leap-second is added. * Removed exposition-only members from link and leap, merging the relevant description into the corresponding accessor. * Plus a variety of changes to massage the wording and fix spelling and grammar errors, and avoid unfortunate line wrapping.
1 parent ad25947 commit 4f87609

File tree

3 files changed

+9634
-71
lines changed

3 files changed

+9634
-71
lines changed

source/iostreams.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10741,7 +10741,7 @@
1074110741
enum class copy_options;
1074210742
enum class directory_options;
1074310743

10744-
using file_time_type = chrono::time_point<@\textit{trivial-clock}@>;
10744+
using file_time_type = chrono::time_point<chrono::file_clock>;
1074510745

1074610746
// \ref{fs.op.funcs}, filesystem operations
1074710747
path absolute(const path& p);

source/threads.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
requirements.
2828
If a template parameter is named \tcode{Predicate}, \tcode{operator()} applied to
2929
the template argument shall return a value that is convertible to \tcode{bool}.
30+
If a template parameter is named \tcode{Clock},
31+
the corresponding template argument shall be a type \tcode{C}
32+
for which \tcode{is_clock_v<C>} is \tcode{true};
33+
otherwise the program is ill-formed.
3034

3135
\rSec2[thread.req.exception]{Exceptions}
3236

0 commit comments

Comments
 (0)