Title
Boolean's expression requirements are ordered inconsistently
Status
c++20
Section
[iterator.range]
Submitter
Casey Carter

Created on 2019-06-06.00:00:00 last changed 38 months ago

Messages

Date: 2019-06-13.19:56:36

Proposed resolution:

This wording is relative to N4810.

  1. Modify [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>;
    };
    
Date: 2019-06-15.00:00:00

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

Date: 2019-06-06.20:56:01

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.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2019-07-22 15:46:37adminsetstatus: voting -> wp
2019-06-17 05:25:36adminsetstatus: ready -> voting
2019-06-13 19:56:36adminsetmessages: + msg10439
2019-06-13 19:56:36adminsetstatus: new -> ready
2019-06-06 19:22:13adminsetmessages: + msg10415
2019-06-06 00:00:00admincreate