LWG-3417: Deprecate volatile atomic inc/dec and wait/notify operations - #6408
LWG-3417: Deprecate volatile atomic inc/dec and wait/notify operations#6408Shengxin Pei (TPPPP72) wants to merge 2 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull request overview
Implements LWG 3417 by completing conditional deprecation checks for volatile atomic operations.
Changes:
- Adds checks for volatile increment/decrement and wait/notify operations.
- Adds and registers coverage across supported language modes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
stl/inc/atomic |
Adds conditional deprecation checks. |
tests/std/tests/P1831R1_deprecated_volatile_atomic/test.cpp |
Exercises affected operations. |
tests/std/tests/P1831R1_deprecated_volatile_atomic/env.lst |
Configures the test matrix. |
tests/std/test.lst |
Registers the test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,50 @@ | |||
| // Copyright (c) Microsoft Corporation. | |||
There was a problem hiding this comment.
I strongly doubt whether this test file makes any sense. At least, it certainly isn't verifying deprecation at this moment.
IIUC, MSVC STL hasn't been verifying deprecation messages in its test suite.
There was a problem hiding this comment.
It tests deprecation silencing, i.e. that these functions can be made back available as for now.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
tests/std/tests/P1831R1_deprecated_volatile_atomic/test.cpp:31
- These calls only use
atomic<int>(and below,atomic<int*>), both of which are always lock-free in this implementation. Therefore_Deprecate_non_lock_free_volatile<_Ty, false>is never selected, so the test does not exercise the newly added wait/notify deprecation path or its suppression. Please also instantiate these operations with a guaranteed non-lock-free trivially copyable type.
volatile atomic<int> ai{0};
ai.notify_one();
ai.notify_all();
ai.wait(1);
Resolves LWG 3417 (Missing volatile atomic deprecations) adding deprecation checks to
volatileatomic increment/decrement operators as well aswait/notifyoperations whenis_always_lock_freeis false.Close #6312