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.

3208. Boolean's expression requirements are ordered inconsistently

Section: 23.7 [iterator.range] Status: WP Submitter: Casey Carter Opened: 2019-06-06 Last modified: 2019-07-27

Priority: 0

View other active issues in [iterator.range].

View all other issues in [iterator.range].

View all issues with WP status.

Discussion:

For consistency of presentation, we should group and order the && and || expression requirements similarly to the == and != expression requirements. Note that the suggested change is not quite editorial: evaluation of requirements for satisfaction has short-circuiting behavior, so the declaration order of requirements is normatively significant in general.

[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 18.5.2 [concept.boolean] as indicated:

    […]
      { b1 } -> ConvertibleTo<bool>;
      { !b1 } -> ConvertibleTo<bool>;
      { b1 &&  a } -> Same<bool>;
      { b1 ||  a } -> Same<bool>;
      { b1 && b2 } -> Same<bool>;
      { b1 &&  a } -> Same<bool>;
      {  a && b2 } -> Same<bool>;
      { b1 || b2 } -> Same<bool>;
      { b1 ||  a } -> Same<bool>;
      {  a || b2 } -> Same<bool>;
      { b1 == b2 } -> ConvertibleTo<bool>;
      { b1 ==  a } -> ConvertibleTo<bool>;
      {  a == b2 } -> ConvertibleTo<bool>;
      { b1 != b2 } -> ConvertibleTo<bool>;
      { b1 !=  a } -> ConvertibleTo<bool>;
      {  a != b2 } -> ConvertibleTo<bool>;
    };