shared(int) val = 3; atomic_fetch_sub_explicit_impl(&val, 3, memory_order.memory_order_seq_cst); assert(atomic_load_impl(&val) == 0);
See Implementation