This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.

3209. Expression in year::ok() returns clause is ill-formed

Section: 27.8.5.2 [time.cal.year.members] Status: WP Submitter: Tomasz Kamiński Opened: 2019-05-28 Last modified: 2019-07-27

Priority: 0

View all issues with WP status.

Discussion:

The expression in the Returns element of year::ok in [time.cal.year.members] p18:

min() <= y_ && y_ <= max()

is ill-formed, as it attempts to compare type short (type of y_ member) with type year (type of year::min() and year::max()).

[2019-06-13; Priority to 0 and Status to Tentatively Ready after seven positive votes on the reflector.]

Proposed resolution:

This wording is relative to N4810.

  1. Modify 27.8.5.2 [time.cal.year.members] as indicated:

    constexpr bool ok() const noexcept;
    

    -18- Returns: min().y_ <= y_ && y_ <= max().y_.