This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// {{{ | |
// vim: set foldmethod=marker: | |
// g++ -O3 -pthread sc.cpp && ./a.out | |
#include <cstdio> | |
#include <thread> | |
#include <atomic> | |
using namespace std; | |
constexpr auto load_order = memory_order_acquire; | |
constexpr auto store_order = memory_order_release; |