Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <atomic>
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. std::atomic<int> i(0);
  7. volatile int c = 1;
  8. i.store(c, std::memory_order_release);
  9. std::cout << i.load(std::memory_order_acquire) << std::endl;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement