Top "Stdatomic" questions

std::atomic is a class template in the C++11 Standard Library which provides atomic operations.

When do I really need to use atomic<bool> instead of bool?

Isn't atomic<bool> redundant because bool is atomic by nature? I don't think it's possible to have a …

c++ c++11 atomicity stdatomic
"Use of deleted function" error with std::atomic_int

I want to use an std::atomic_int variable. In my code, I have: #include <atomic> std::atomic_…

c++ c++11 stdatomic
Does std::atomic<std::string> work appropriately?

I am reading through Anthony Williams' "C++ Concurrency in Action" and in Chapter 5, which talks about the new multithreading-aware memory …

c++ atomic stdstring stdatomic
Why isn't atomic double fully implemented

My question is quite simple. Why isn't std::atomic<double> implemented completely? I know it has to do …

c++ floating-point atomic compare-and-swap stdatomic
error C2280: attempting to reference a deleted function (atomic<int>)

I have a class A with a member variable _atomicVar of type std::atomic<int>. #include <atomic&…

c++ c++11 stdatomic
c++, std::atomic, what is std::memory_order and how to use them?

Can anyone explain what is std::memory_order in plain English, and how to use them with std::atomic<&…

c++ multithreading atomic memory-model stdatomic
Atomic access to shared memory

I have a shared memory between multiple processes that interpets the memory in a certain way. Ex: DataBlock { int counter; …

c++ linux shared-memory memory-barriers stdatomic
How do memory_order_seq_cst and memory_order_acq_rel differ?

Stores are release operations and loads are acquire operations for both. I know that memory_order_seq_cst is meant …

c++ c++11 memory-model stdatomic
C++11 memory_order_acquire and memory_order_release semantics?

http://en.cppreference.com/w/cpp/atomic/memory_order, and other C++11 online references, define memory_order_acquire and memory_…

c++ mutex atomic memory-model stdatomic