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