Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use Atomic, and not std::atomic #10218

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Al2Klimov
Copy link
Member

Atomic enforces usage of its only safe constructor, in contrast to std::atomic.

The default-initialized std::atomic does not contain a T object, and its only valid uses are destruction and initialization by std::atomic_init, see LWG issue 2334.

-- https://en.cppreference.com/w/cpp/atomic/atomic/atomic

@Al2Klimov Al2Klimov added the core/quality Improve code, libraries, algorithms, inline docs label Nov 6, 2024
@cla-bot cla-bot bot added the cla/signed label Nov 6, 2024
Atomic enforces usage of its only safe constructor,
in contrast to std::atomic.

"The default-initialized std::atomic<T> does not contain
a T object, and its only valid uses are destruction and
initialization by std::atomic_init, see LWG issue 2334."
 -- https://en.cppreference.com/w/cpp/atomic/atomic/atomic
@Al2Klimov Al2Klimov force-pushed the Atomic-not-std-atomic branch from 33181a3 to 578275e Compare November 25, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed core/quality Improve code, libraries, algorithms, inline docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant