forked from lwg/issues
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New issue from Eric Niebler: ""Required behavior" too narrowly defined"
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version='1.0' encoding='utf-8' standalone='no'?> | ||
<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> | ||
|
||
<issue num="4005" status="New"> | ||
<title>"Required behavior" too narrowly defined</title> | ||
<section><sref ref="[defns.required.behavior]"/><sref ref="[structure.specifications]"/><sref ref="[res.on.functions]"/></section> | ||
<submitter>Eric Niebler</submitter> | ||
<date>03 Nov 2023</date> | ||
<priority>99</priority> | ||
|
||
<discussion> | ||
<p> | ||
The library's definition of the term "required behavior" (<sref ref="[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 | ||
<sref ref="[structure.specifications]"/> p3. | ||
<p/> | ||
However, the specification of the random number generator library uses "Required behavior" as such a descriptive element | ||
of its functions' semantics (e.g., <sref ref="[rand.predef]"/>). | ||
<p/> | ||
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 <tt>std::execution</tt>, where algorithms are | ||
customizable but the customizations are required to behave a certain way. | ||
<p/> | ||
<b>Daniel:</b> | ||
<p/> | ||
Bullet (2.4) of <sref ref="[res.on.functions]"/> also contradicts to the more narrow definition of | ||
<sref ref="[defns.required.behavior]"/> by suddenly extending it to "destructor operations". | ||
</p> | ||
</discussion> | ||
|
||
<resolution> | ||
</resolution> | ||
|
||
</issue> |