diff --git a/source/time.tex b/source/time.tex index 8102240661..bef4de1ba9 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1120,7 +1120,7 @@ \pnum The \tcode{period} of the \tcode{duration} indicated by this specialization of -\tcode{common_type} shall be the greatest common divisor of \tcode{Period1} and +\tcode{common_type} is the greatest common divisor of \tcode{Period1} and \tcode{Period2}. \begin{note} This can be computed by forming a ratio of the @@ -1283,10 +1283,8 @@ \begin{itemdescr} \pnum -\remarks -This constructor shall not participate in overload -resolution unless -\tcode{Rep2} is implicitly convertible to \tcode{rep} and +\constraints +\tcode{is_convertible_v} is \tcode{true} and \begin{itemize} \item \tcode{treat_as_floating_point_v} is \tcode{true} or \item \tcode{treat_as_floating_point_v} is \tcode{false}. @@ -1298,10 +1296,6 @@ \end{codeblock} \end{example} -\pnum -\effects -Constructs an object of type \tcode{duration}. - \pnum \ensures \tcode{count() == static_cast(r)}. @@ -1315,9 +1309,8 @@ \begin{itemdescr} \pnum -\remarks -This constructor shall not participate in overload resolution unless -no overflow is induced in the conversion and +\constraints +No overflow is induced in the conversion and \tcode{treat_as_floating_point_v} is \tcode{true} or both \tcode{ratio_divide::den} is \tcode{1} and \tcode{treat_as_floating_point_v} is \tcode{false}. @@ -1337,8 +1330,7 @@ \pnum \effects -Constructs an object of type \tcode{duration}, constructing \tcode{rep_} from\\ -\tcode{duration_cast(d).count()}. +Initializes \tcode{rep_} with \tcode{duration_cast(d).count()}. \end{itemdescr} \rSec2[time.duration.observer]{Observer} @@ -1386,7 +1378,7 @@ \begin{itemdescr} \pnum \effects -As if by \tcode{++rep_}. +Equivalent to: \tcode{++rep_}. \pnum \returns @@ -1400,8 +1392,8 @@ \begin{itemdescr} \pnum -\returns -\tcode{duration(rep_++)}. +\effects +Equivalent to: \tcode{return duration(rep_++);} \end{itemdescr} \indexlibrarymember{operator\dcr}{duration}% @@ -1412,7 +1404,7 @@ \begin{itemdescr} \pnum \effects -As if by \tcode{--rep_}. +Equivalent to: \tcode{--rep_}. \pnum \returns @@ -1426,8 +1418,8 @@ \begin{itemdescr} \pnum -\returns -\tcode{duration(rep_-{}-)}. +\effects +Equivalent to: \tcode{return duration(rep_-{}-);} \end{itemdescr} \indexlibrarymember{operator+=}{duration}% @@ -1438,7 +1430,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ += d.count();} +Equivalent to: \tcode{rep_ += d.count()}. \pnum \returns @@ -1453,7 +1445,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ -= d.count();} +Equivalent to: \tcode{rep_ -= d.count()}. \pnum \returns @@ -1468,7 +1460,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ *= rhs;} +Equivalent to: \tcode{rep_ *= rhs}. \pnum \returns @@ -1483,7 +1475,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ /= rhs;} +Equivalent to: \tcode{rep_ /= rhs}. \pnum \returns @@ -1498,7 +1490,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ \%= rhs;} +Equivalent to: \tcode{rep_ \%= rhs}. \pnum \returns @@ -1513,7 +1505,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{rep_ \%= rhs.count();} +Equivalent to: \tcode{rep_ \%= rhs.count()}. \pnum \returns @@ -1597,9 +1589,8 @@ \begin{itemdescr} \pnum -\remarks -This operator shall not participate in overload -resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t}. +\constraints +\tcode{is_convertible_v>} is \tcode{true}. \pnum \returns @@ -1615,9 +1606,8 @@ \begin{itemdescr} \pnum -\remarks -This operator shall not participate in overload -resolution unless \tcode{Rep1} is implicitly convertible to \tcode{common_type_t}. +\constraints +\tcode{is_convertible_v>} is \tcode{true}. \pnum \returns @@ -1633,9 +1623,8 @@ \begin{itemdescr} \pnum -\remarks -This operator shall not participate in overload -resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t} +\constraints +\tcode{is_convertible_v>} is \tcode{true} and \tcode{Rep2} is not a specialization of \tcode{duration}. \pnum @@ -1669,9 +1658,8 @@ \begin{itemdescr} \pnum -\remarks -This operator shall not participate in overload -resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t} and +\constraints +\tcode{is_convertible_v>} is \tcode{true} and \tcode{Rep2} is not a specialization of \tcode{duration}. \pnum @@ -1790,9 +1778,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -1842,9 +1829,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -1860,9 +1846,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -1878,11 +1863,9 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}, -and \tcode{treat_as_floating_point_v} -is \tcode{false}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration} and +\tcode{treat_as_floating_point_v} is \tcode{false}. \pnum \returns @@ -2009,9 +1992,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{numeric_limits::is_signed} is \tcode{true}. +\constraints +\tcode{numeric_limits::is_signed} is \tcode{true}. \pnum \returns @@ -2030,7 +2012,8 @@ \begin{itemdescr} \pnum -\requires \tcode{Rep} is an integral type +\mandates +\tcode{Rep} is an integral type whose integer conversion rank\iref{conv.rank} is greater than or equal to that of \tcode{short}, or a floating-point type. @@ -2179,9 +2162,8 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{time_point}, initializing -\tcode{d_} with \tcode{duration::zero()}. Such a \tcode{time_point} object -represents the epoch. +Initializes \tcode{d_} with \tcode{duration::zero()}. +Such a \tcode{time_point} object represents the epoch. \end{itemdescr} \indexlibraryctor{time_point}% @@ -2192,9 +2174,8 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{time_point}, initializing -\tcode{d_} with \tcode{d}. Such a \tcode{time_point} object represents the epoch -\tcode{+ d}. +Initializes \tcode{d_} with \tcode{d}. +Such a \tcode{time_point} object represents the epoch \tcode{+ d}. \end{itemdescr} \indexlibraryctor{time_point}% @@ -2205,14 +2186,12 @@ \begin{itemdescr} \pnum -\remarks -This constructor shall not participate in overload resolution unless \tcode{Duration2} -is implicitly convertible to \tcode{duration}. +\constraints +\tcode{is_convertible_v} is \tcode{true}. \pnum \effects -Constructs an object of type \tcode{time_point}, initializing -\tcode{d_} with \tcode{t.time_since_epoch()}. +Initializes \tcode{d_} with \tcode{t.time_since_epoch()}. \end{itemdescr} \rSec2[time.point.observer]{Observer} @@ -2238,7 +2217,7 @@ \begin{itemdescr} \pnum \effects -\tcode{++d_}. +Equivalent to: \tcode{++d_}. \pnum \returns @@ -2252,8 +2231,8 @@ \begin{itemdescr} \pnum -\returns -\tcode{time_point\{d_++\}}. +\effects +Equivalent to: \tcode{return time_point\{d_++\};} \end{itemdescr} \indexlibrarymember{operator--}{time_point}% @@ -2264,7 +2243,7 @@ \begin{itemdescr} \pnum \effects -\tcode{--d_}. +Equivalent to: \tcode{--d_}. \pnum \returns @@ -2278,8 +2257,8 @@ \begin{itemdescr} \pnum -\returns -\tcode{time_point\{d_--\}}. +\effects +Equivalent to: \tcode{return time_point\{d_-{}-\};} \end{itemdescr} \indexlibrarymember{operator+=}{time_point}% @@ -2290,7 +2269,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{d_ += d;} +Equivalent to: \tcode{d_ += d}. \pnum \returns @@ -2305,7 +2284,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{d_ -= d;} +Equivalent to: \tcode{d_ -= d}. \pnum \returns @@ -2486,9 +2465,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -2505,9 +2483,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -2522,9 +2499,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}. +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}. \pnum \returns @@ -2539,9 +2515,8 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution -unless \tcode{ToDuration} is a specialization of \tcode{duration}, and +\constraints +\tcode{ToDuration} is a specialization of \tcode{duration}, and \tcode{treat_as_floating_point_v} is \tcode{false}. \pnum @@ -2552,7 +2527,7 @@ \rSec1[time.clock]{Clocks} \pnum -The types defined in this subclause shall meet the +The types defined in this subclause meet the \oldconcept{TrivialClock} requirements\iref{time.clock.req} unless otherwise specified. @@ -2605,8 +2580,8 @@ \begin{itemdescr} \pnum -\requires \tcode{system_clock::duration::min() < system_clock::duration::zero()} shall -be \tcode{true}.\\ +\constraints +\tcode{system_clock::duration::min() < system_clock::duration::zero()} is \tcode{true}. \\ \begin{note} This implies that \tcode{rep} is a signed type. \end{note} @@ -2655,10 +2630,9 @@ \begin{itemdescr} \pnum -\remarks -This operator shall not participate in overload resolution if -\tcode{treat_as_floating_point_v} is \tcode{true}, -or if \tcode{Duration\{1\} >= days\{1\}}. +\constraints +\tcode{treat_as_floating_point_v} is \tcode{false}, and +\tcode{Duration\{1\} < days\{1\}} is \tcode{true}. \pnum \effects @@ -2713,8 +2687,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} -shall be called and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -2899,8 +2873,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -3095,8 +3069,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -3258,8 +3232,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -3365,8 +3339,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -3476,8 +3450,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid date, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{tp} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{tp} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -3662,13 +3636,13 @@ \begin{itemdescr} \pnum -\remarks -This function does not participate in overload resolution unless +\constraints \tcode{SourceClock::to_sys(t)} is well-formed. -If \tcode{SourceClock::to_sys(t)} -does not return \tcode{sys_time}, -where \tcode{Duration} is a valid \tcode{chrono::duration} specialization, -the program is ill-formed. + +\pnum +\mandates +\tcode{SourceClock::to_sys(t)} returns a \tcode{sys_time}, +where \tcode{Duration} is a valid \tcode{chrono::duration} specialization. \pnum \returns @@ -3693,13 +3667,13 @@ \begin{itemdescr} \pnum -\remarks -This function does not participate in overload resolution unless +\constraints \tcode{DestClock::from_sys(t)} is well-formed. -If \tcode{DestClock::from_sys(t)} does not return -\tcode{time_point}, -where \tcode{Duration} is a valid \tcode{chrono::duration} specialization, -the program is ill-formed. + +\pnum +\mandates +\tcode{DestClock::from_sys(t)} returns a \tcode{time_point}, +where \tcode{Duration} is a valid \tcode{chrono::duration} specialization. \pnum \returns @@ -3726,13 +3700,13 @@ \begin{itemdescr} \pnum -\remarks -This function does not participate in overload resolution unless +\constraints \tcode{SourceClock::to_utc(t)} is well-formed. -If \tcode{SourceClock::to_utc(t)} does not return -\tcode{utc_time}, -where \tcode{Duration} is a valid \tcode{chrono::duration} specialization, -the program is ill-formed. + +\pnum +\mandates +\tcode{SourceClock::to_utc(t)} returns a \tcode{utc_time}, +where \tcode{Duration} is a valid \tcode{chrono::duration} specialization. \pnum \returns @@ -3757,13 +3731,13 @@ \begin{itemdescr} \pnum -\remarks -This function does not participate in overload resolution unless +\constraints \tcode{DestClock::from_utc(t)} is well-formed. -If \tcode{DestClock::from_utc(t)} does not return -\tcode{time_point}, -where \tcode{Duration} is a valid \tcode{chrono::duration} specialization, -the program is ill-formed. + +\pnum +\mandates +\tcode{DestClock::from_utc(t)} returns a \tcode{time_point}, +where \tcode{Duration} is a valid \tcode{chrono::duration} specialization. \pnum \returns @@ -3780,10 +3754,10 @@ \begin{itemdescr} \pnum -\remarks -This function does not participate in overload resolution unless -at least one of the following clock time conversion expressions +\constraints +At least one of the following clock time conversion expressions is well-formed: + \begin{itemize} \item \begin{codeblock} @@ -3821,9 +3795,11 @@ another clock time conversion expression if it involves fewer \tcode{operator()} calls on \tcode{clock_time_conversion} specializations. -If, among the well-formed clock time conversion expressions -from the above list, there is not a unique best expression, -the \tcode{clock_cast} is ambiguous and the program is ill-formed. + +\pnum +\mandates +Among the well-formed clock time conversion expressions +from the above list, there is a unique best expression. \pnum \returns @@ -3890,8 +3866,8 @@ but may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{day}'s unspecified internal storage. -\tcode{day} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}), +\tcode{day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{days} objects, which represent a difference between two \tcode{day} objects. @@ -3908,8 +3884,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{day} by -initializing \tcode{d_} with \tcode{d}. +Initializes \tcode{d_} with \tcode{d}. The value held is unspecified if \tcode{d} is not in the range \crange{0}{255}. \end{itemdescr} @@ -3951,7 +3926,7 @@ \begin{itemdescr} \pnum \effects -\tcode{--d_}. +Equivalent to: \tcode{--d_}. \pnum \returns @@ -4128,8 +4103,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid day, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{d} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{d} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -4184,8 +4159,8 @@ but may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{month}'s unspecified internal storage. -\tcode{month} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}), +\tcode{month} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{months} objects, which represent a difference between two \tcode{month} objects. @@ -4202,8 +4177,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{month} by -initializing \tcode{m_} with \tcode{m}. +Initializes \tcode{m_} with \tcode{m}. The value held is unspecified if \tcode{m} is not in the range \crange{0}{255}. \end{itemdescr} @@ -4443,8 +4417,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid month, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{m} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{m} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -4495,8 +4469,8 @@ It can represent values in the range \crange{min()}{max()}. It can be constructed with any \tcode{int} value, which will be subsequently truncated to fit into \tcode{year}'s unspecified internal storage. -\tcode{year} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}), +\tcode{year} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{years} objects, which represent a difference between two \tcode{year} objects. @@ -4513,8 +4487,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year} by -initializing \tcode{y_} with \tcode{y}. +Initializes \tcode{y_} with \tcode{y}. The value held is unspecified if \tcode{y} is not in the range \crange{-32767}{32767}. \end{itemdescr} @@ -4788,8 +4761,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid year, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{y} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{y} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -4851,7 +4824,7 @@ it may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{weekday}'s unspecified internal storage. -\tcode{weekday} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}). +\tcode{weekday} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \begin{note} \tcode{weekday} is not \oldconcept{LessThanComparable} @@ -4873,8 +4846,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{weekday} by -initializing \tcode{wd_} with \tcode{wd == 7 ?\ 0 :\ wd}. +Initializes \tcode{wd_} with \tcode{wd == 7 ?\ 0 :\ wd}. The value held is unspecified if \tcode{wd} is not in the range \crange{0}{255}. \end{itemdescr} @@ -4886,9 +4858,8 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{weekday} by -computing what day of the week corresponds to the \tcode{sys_days} \tcode{dp}, -and representing that day of the week in \tcode{wd_}. +Computes what day of the week corresponds to the \tcode{sys_days} \tcode{dp}, +and initializes that day of the week in \tcode{wd_}. \pnum \begin{example} @@ -4906,13 +4877,12 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{weekday} by -computing what day of the week corresponds to the \tcode{local_days} \tcode{dp}, -and representing that day of the week in \tcode{wd_}. +Computes what day of the week corresponds to the \tcode{local_days} \tcode{dp}, +and initializes that day of the week in \tcode{wd_}. \pnum -\remarks -The value after construction is identical to that constructed from +\ensures +The value is identical to that constructed from \tcode{sys_days\{dp.time_since_epoch()\}}. \end{itemdescr} @@ -5174,8 +5144,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid weekday, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{wd} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{wd} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -5358,8 +5328,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{weekday_last} by -initializing \tcode{wd_} with \tcode{wd}. +Initializes \tcode{wd_} with \tcode{wd}. \end{itemdescr} \indexlibrarymember{weekday_last}{weekday}% @@ -5438,8 +5407,8 @@ \pnum \tcode{month_day} represents a specific day of a specific month, but with an unspecified year. -\tcode{month_day} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}). +\tcode{month_day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{month_day} is a trivially copyable and standard-layout class type. @@ -5454,8 +5423,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{month_day} by -initializing \tcode{m_} with \tcode{m}, and \tcode{d_} with \tcode{d}. +Initializes \tcode{m_} with \tcode{m}, and \tcode{d_} with \tcode{d}. \end{itemdescr} \indexlibrarymember{month}{month_day}% @@ -5559,8 +5527,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid \tcode{month_day}, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{md} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{md} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -5615,8 +5583,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{month_day_last} by -initializing \tcode{m_} with \tcode{m}. +Initializes \tcode{m_} with \tcode{m}. \end{itemdescr} \indexlibrarymember{month}{month_day_last}% @@ -5727,8 +5694,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{month_weekday} by -initializing \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. +Initializes \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. \end{itemdescr} \indexlibrarymember{month}{month_weekday}% @@ -5844,8 +5810,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{month_weekday_last} by -initializing \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. +Initializes \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. \end{itemdescr} \indexlibrarymember{month}{month_weekday_last}% @@ -5943,8 +5908,8 @@ \tcode{year_month} represents a specific month of a specific year, but with an unspecified day. \tcode{year_month} is a field-based time point with a resolution of \tcode{months}. -\tcode{year_month} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}). +\tcode{year_month} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month} is a trivially copyable and standard-layout class type. @@ -5959,8 +5924,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month} by -initializing \tcode{y_} with \tcode{y}, and \tcode{m_} with \tcode{m}. +Initializes \tcode{y_} with \tcode{y}, and \tcode{m_} with \tcode{m}. \end{itemdescr} \indexlibrarymember{year}{year_month}% @@ -6203,8 +6167,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid \tcode{year_month}, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{ym} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{ym} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -6260,8 +6224,8 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_day} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}). +\tcode{year_month_day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month_day} is a trivially copyable and standard-layout class type. @@ -6277,8 +6241,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_day} by -initializing +Initializes \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{d_} with \tcode{d}. @@ -6292,8 +6255,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_day} by -initializing +Initializes \tcode{y_} with \tcode{ymdl.year()}, \tcode{m_} with \tcode{ymdl.month()}, and \tcode{d_} with \tcode{ymdl.day()}. @@ -6331,11 +6293,6 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_day} -that corresponds to the date represented by \tcode{dp}. - -\pnum -\remarks Equivalent to constructing with \tcode{sys_days\{dp.time_since_epoch()\}}. \end{itemdescr} @@ -6452,7 +6409,7 @@ \remarks A \tcode{sys_days} in the range \crange{days\{-12687428\}}{days\{11248737\}} which is converted to a \tcode{year_month_day} -shall have the same value when converted back to a \tcode{sys_days}. +has the same value when converted back to a \tcode{sys_days}. \pnum \begin{example} @@ -6634,8 +6591,8 @@ the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. If the parse fails to decode a valid \tcode{year_month_day}, -\tcode{is.setstate(ios_base::failbit)} shall be called -and \tcode{ymd} shall not be modified. +\tcode{is.setstate(ios_base::failbit)} is called and +\tcode{ymd} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. If \tcode{\%z} (or a modified variant) is used and successfully parsed, @@ -6688,8 +6645,8 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_day_last} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}). +\tcode{year_month_day_last} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month_day_last} is a trivially copyable and standard-layout class type. @@ -6705,8 +6662,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_day_last} by -initializing \tcode{y_} with \tcode{y} and \tcode{mdl_} with \tcode{mdl}. +Initializes \tcode{y_} with \tcode{y} and \tcode{mdl_} with \tcode{mdl}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_day_last}% @@ -7020,7 +6976,7 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_weekday} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}). +\tcode{year_month_weekday} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \pnum \tcode{year_month_weekday} is a trivially copyable and standard-layout class type. @@ -7036,8 +6992,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_weekday} by -initializing \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. +Initializes \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. \end{itemdescr} \indexlibraryctor{year_month_weekday}% @@ -7066,11 +7021,6 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_weekday} -that corresponds to the date represented by \tcode{dp}. - -\pnum -\remarks Equivalent to constructing with \tcode{sys_days\{dp.time_since_epoch()\}}. \end{itemdescr} @@ -7379,7 +7329,7 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_weekday_last} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}). +\tcode{year_month_weekday_last} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \pnum \tcode{year_month_weekday_last} is a trivially copyable and standard-layout class type. @@ -7395,8 +7345,7 @@ \begin{itemdescr} \pnum \effects -Constructs an object of type \tcode{year_month_weekday_last} by -initializing \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. +Initializes \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_weekday_last}% @@ -8602,16 +8551,16 @@ \begin{itemdescr} \pnum -\returns -A reference to the first \tcode{tzdb} in the container. - -\pnum -\remarks +\sync This operation is thread-safe with respect to \tcode{reload_tzdb()}. \begin{note} \tcode{reload_tzdb()} pushes a new \tcode{tzdb} onto the front of this container. \end{note} + +\pnum +\returns +A reference to the first \tcode{tzdb} in the container. \end{itemdescr} \indexlibrarymember{erase_after}{tzdb_list}% @@ -8621,7 +8570,7 @@ \begin{itemdescr} \pnum -\requires +\expects The iterator following \tcode{p} is dereferenceable. \pnum @@ -8634,7 +8583,7 @@ or \tcode{end()} if no such element exists. \pnum -\remarks +\ensures No pointers, references, or iterators are invalidated except those referring to the erased \tcode{tzdb}. \begin{note} @@ -8708,12 +8657,12 @@ holding a single initialized \tcode{tzdb}. \pnum -\returns -A reference to the database. +\sync +It is safe to call this function from multiple threads at one time. \pnum -\remarks -It is safe to call this function from multiple threads at one time. +\returns +A reference to the database. \pnum \throws @@ -8792,17 +8741,17 @@ accessed by \tcode{get_tzdb_list()}. \pnum -\returns -\tcode{get_tzdb_list().front()}. +\sync +This function is thread-safe with respect to +\tcode{get_tzdb_list().front()} and \tcode{get_tzdb_list().erase_after()}. \pnum -\remarks +\ensures No pointers, references, or iterators are invalidated. \pnum -\remarks -This function is thread-safe with respect to -\tcode{get_tzdb_list().front()} and \tcode{get_tzdb_list().erase_after()}. +\returns +\tcode{get_tzdb_list().front()}. \pnum \throws @@ -8855,12 +8804,12 @@ \begin{itemdescr} \pnum -\requires \tcode{i.result == local_info::nonexistent}. +\expects +\tcode{i.result == local_info::nonexistent} is \tcode{true}. \pnum \effects -Constructs a \tcode{nonexistent_local_time} -by initializing the base class with a sequence of \tcode{char} +Initializes the base class with a sequence of \tcode{char} equivalent to that produced by \tcode{os.str()} initialized as shown below: @@ -8930,12 +8879,12 @@ \begin{itemdescr} \pnum -\requires \tcode{i.result == local_info::ambiguous}. +\expects +\tcode{i.result == local_info::ambiguous} is \tcode{true}. \pnum \effects -Constructs an \tcode{ambiguous_local_time} -by initializing the base class with a sequence of \tcode{char} +Initializes the base class with a sequence of \tcode{char} equivalent to that produced by \tcode{os.str()} initialized as shown below: @@ -9470,15 +9419,13 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{traits::default_zone()} is a well-formed expression. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{traits::default_zone()} and -default constructing \tcode{tp_}. +Initializes \tcode{zone_} with \tcode{traits::default_zone()} and +default constructs \tcode{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9487,14 +9434,12 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{traits::default_zone()} is a well-formed expression. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{traits::default_zone()} and \tcode{tp_} with \tcode{st}. +Initializes \tcode{zone_} with \tcode{traits::default_zone()} and \tcode{tp_} with \tcode{st}. \end{itemdescr} \begin{itemdecl} @@ -9503,13 +9448,13 @@ \begin{itemdescr} \pnum -\requires \tcode{z} refers to a time zone. +\expects +\tcode{z} refers to a time zone. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{std::move(z)} and -default constructing \tcode{tp_}. +Initializes \tcode{zone_} with \tcode{std::move(z)} and +default constructs \tcode{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9518,16 +9463,14 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{traits::locate_zone(string_view\{\})} is a well-formed expression and \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(string_view\{\})}. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{traits::locate_zone(name)} and -default constructing \tcode{tp_}. +Initializes \tcode{zone_} with \tcode{traits::locate_zone(name)} and +default constructs \tcode{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9537,14 +9480,12 @@ \begin{itemdescr} \pnum -\remarks -Does not participate in overload resolution unless -\tcode{sys_time} is implicitly convertible to \tcode{sys_time}. +\constraints +\tcode{is_convertible_v, sys_time>} is \tcode{true}. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{y.zone_} and \tcode{tp_} with \tcode{y.tp_}. +Initializes \tcode{zone_} with \tcode{y.zone_} and \tcode{tp_} with \tcode{y.tp_}. \end{itemdescr} \begin{itemdecl} @@ -9553,12 +9494,12 @@ \begin{itemdescr} \pnum -\requires \tcode{z} refers to a time zone. +\expects +\tcode{z} refers to a time zone. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{st}. +Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{st}. \end{itemdescr} \begin{itemdecl} @@ -9567,8 +9508,7 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)} and \tcode{st}. \pnum @@ -9582,20 +9522,21 @@ \begin{itemdescr} \pnum -\requires \tcode{z} refers to a time zone. +\expects +\tcode{z} refers to a time zone. \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \begin{codeblock} -decltype(declval()->to_sys(local_time{})) +is_convertible_v< + decltype(declval()->to_sys(local_time{})), + sys_time> \end{codeblock} -is convertible to \tcode{sys_time}. +is \tcode{true}. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp)}. +Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp)}. \end{itemdescr} \begin{itemdecl} @@ -9604,8 +9545,7 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)} and \tcode{tp}. \pnum @@ -9619,20 +9559,21 @@ \begin{itemdescr} \pnum -\requires \tcode{z} refers to a time zone. +\expects +\tcode{z} refers to a time zone. \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \begin{codeblock} -decltype(declval()->to_sys(local_time{}, choose::earliest)) +is_convertible_v< + decltype(declval()->to_sys(local_time{}, choose::earliest)), + sys_time> \end{codeblock} -is convertible to \tcode{sys_time}. +is \tcode{true}. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp, c)}. +Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp, c)}. \end{itemdescr} \begin{itemdecl} @@ -9641,8 +9582,7 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)}, \tcode{local_time}, and \tcode{choose}. @@ -9658,17 +9598,16 @@ \begin{itemdescr} \pnum -\remarks -Does not participate in overload resolution unless -\tcode{sys_time} is implicitly convertible to \tcode{sys_time}. +\constraints +\tcode{is_convertible_v, sys_time>} is \tcode{true}. \pnum -\requires \tcode{z} refers to a valid time zone. +\expects +\tcode{z} refers to a valid time zone. \pnum \effects -Constructs a \tcode{zoned_time} by -initializing \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{y.tp_}. +Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{y.tp_}. \end{itemdescr} \begin{itemdecl} @@ -9678,12 +9617,12 @@ \begin{itemdescr} \pnum -\remarks -Does not participate in overload resolution unless -\tcode{sys_time} is implicitly convertible to \tcode{sys_time}. +\constraints +\tcode{is_convertible_v, sys_time>} is \tcode{true}. \pnum -\requires \tcode{z} refers to a valid time zone. +\expects +\tcode{z} refers to a valid time zone. \pnum \effects @@ -9701,8 +9640,7 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)} and \tcode{zoned_time}. \pnum @@ -9716,8 +9654,7 @@ \begin{itemdescr} \pnum -\remarks -This constructor does not participate in overload resolution unless +\constraints \tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)}, \tcode{zoned_time}, and \tcode{choose}. @@ -10717,8 +10654,7 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution unless +\constraints \begin{codeblock} from_stream(declval&>(), fmt.c_str(), tp) \end{codeblock} @@ -10740,8 +10676,7 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution unless +\constraints \begin{codeblock} from_stream(declval&>(), fmt.c_str(), tp, addressof(abbrev)) \end{codeblock} @@ -10795,8 +10730,7 @@ \begin{itemdescr} \pnum -\remarks -This function shall not participate in overload resolution unless +\constraints \begin{codeblock} from_stream(declval&>(), fmt.c_str(), tp, addressof(abbrev), &offset)