shared(int) n = 1; auto temp = exchange(n, 10); assert(n == 10); assert(temp == 1);
See Implementation