Title
Clarify if/when short circuiting applies to conditions in Constraints: elements
Status
new
Section
[tuple.cnstr]
Submitter
Jonathan Wakely

Created on 2021-08-23.00:00:00 last changed 31 months ago

Messages

Date: 2021-09-15.00:00:00

[ 2021-09-20; Reflector poll ]

Set priority to 3 after reflector poll.

Date: 2021-08-23.00:00:00

We do not specify whether or not short-circuiting is expected to happen for individual conditions stated in a Constraints: element. For example, [tuple.cnstr] p12 says:

Constraints: sizeof...(Types) equals sizeof...(UTypes) and sizeof...(Types) ≤ 1 and is_constructible_v<Ti , Ui> is true for all i.

It's not even possible to test the is_constructible part unless the first part is true, so presumably it is expected that the sizeof... expressions are tested first, and so the is_constructible traits don't even need to be instantiated.

In some cases it might be user observable whether short circuiting happens, as whether later conditions are tested might affect whether errors outside the immediate context are permitted or not.

We should clarify what is intended, and refactor any Constraints: elements that are special cases where something different is required.

History
Date User Action Args
2021-09-20 11:22:03adminsetmessages: + msg12050
2021-08-23 00:00:00admincreate