Small tests i share because why not
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

18 строки
292 B

#include <thread>
#include <iostream>
volatile int counter=0;
void incr(const int count=200000)
{
for(int i=0;i<count;i++)
counter++;
}
int main()
{
std::thread m(incr,200000);
incr(200000);
std::cout << "Expects 400000, get "<< counter <<std::endl;
return 0;
}