This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
4129. Possibly incorrect wording for data race avoidanceSection: 16.4.6.10 [res.on.data.races] Status: New Submitter: Jiang An Opened: 2024-07-30 Last modified: 2024-08-03
Priority: Not Prioritized
View other active issues in [res.on.data.races].
View all other issues in [res.on.data.races].
View all issues with New status.
Discussion:
From PR cplusplus/draft#6748 which was closed as non-editorial.
Currently, 16.4.6.10 [res.on.data.races] is talking about arguments and "includingthis
", but this
is not a function argument. Moreover, it seems more appropriate to say that a function accesses some object via a parameter. It might need to be considered whether we should use the more general term "range" instead of "container", which will cover std::span
, etc.
Proposed resolution:
This wording is relative to N4986.
Modify 16.4.6.10 [res.on.data.races] as indicated:
-2- A C++ standard library function shall not directly or indirectly access objects (6.10.2 [intro.multithread]) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function's arguments parameters, including
-3- A C++ standard library function shall not directly or indirectly modify objects (6.10.2 [intro.multithread]) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function's non-const arguments parameters, includingthis
the object parameter (if any).this
the object parameter (if any). […] -5- A C++ standard library function shall not access objects indirectly accessible via its arguments parameters or via elements of its container arguments parameters except by invoking functions required by its specification on those container elements.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4