Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <atomic>
- #include <iostream>
- int main()
- {
- std::atomic<int> i(0);
- volatile int c = 1;
- i.store(c, std::memory_order_release);
- std::cout << i.load(std::memory_order_acquire) << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement