// This example uses a non-standard simplified thread composition // syntax. Triple braces enclose a list of threads with triple bar // separating each thread. int main() { atomic_int x; {{{ { x.store(1,mo_relaxed); x.store(2,mo_relaxed); x.store(4,mo_relaxed); } ||| { atomic_compare_exchange_weak_explicit(&x, 2, 3, mo_relaxed, mo_relaxed); } }}} return 0; }