Title
"Required behavior" too narrowly defined
Status
new
Section
[defns.required.behavior][structure.specifications][res.on.functions]
Submitter
Eric Niebler

Created on 2023-11-03.00:00:00 last changed 4 months ago

Messages

Date: 2024-06-15.00:00:00

[ 2024-06-24; The approval of P2810R4 means that "required behavior" is now being incorrectly used in the working paper. ]

Date: 2024-03-15.00:00:00

[ 2024-03-11; Reflector poll ]

Set priority to 2 after reflector poll.

Date: 2023-11-03.00:00:00

The library's definition of the term "required behavior" ([defns.required.behavior]) makes it specific to certain replaceable functions such as the replaceable global allocation functions. Notably, it is not one of the elements that are allowed to appear in the descriptions of general function semantics. That is, it isn't in the list in [structure.specifications] p3.

However, the specification of the random number generator library uses "Required behavior" as such a descriptive element of its functions' semantics (e.g., [rand.predef]).

I think that's a fine use of "Required behavior", so I would like the term to be more generally applicable to the behavior of any stdlib function that may be customized by users. This is relevant for std::execution, where algorithms are customizable but the customizations are required to behave a certain way.

Daniel:

Bullet (2.4) of [res.on.functions] also contradicts to the more narrow definition of [defns.required.behavior] by suddenly extending it to "destructor operations".

History
Date User Action Args
2024-06-24 12:09:57adminsetmessages: + msg14179
2024-03-11 21:55:38adminsetmessages: + msg13980
2023-11-03 00:00:00admincreate