Newest questions tagged c++ - Stack Overflow
Do concurrent accesses to a volatile glvalue result in undefined behavior or implementation-defined behavior?
Consider the following example: #include int main(){ volatile int value = 0; std::jthread t1([&](){ value++; // #1 }); std::jthread t2([&](){ value--; // #2 }); } According to [intro.races] p2: T
View original source