I was wondering, does memory_order_relaxed allow unconstrained reordering of code on the same thread? For example:
// All on the same thread
std::atomic_int num(10);
std::cout << num.load(memory_order_relaxed) << "\n";
num.store(0, memory_order_relaxed);
Is it possible that 0 is printed? (In the actual code another thread is modifying num, but its unrelated)