Closed tomaszkam closed 5 years ago
Decided to pick third option: compare with y_
member of min()
and max()
, which is equivalent to cast.
Discussion:
The expression in Returns element of year::ok
in [time.cal.year.members] p18:
min() <= y && y <= max()
is ill-formed, as it attempts to compare short
(type of y_
member) with year
(type of year::min()
and year::max()
).
Proposed wording:
Change the specification of year::ok
function in [time.cal.year.members] as follows:
constexpr bool ok() const noexcept;
Returns: min().y <= y && y <= max().y
Original comment: