#include #include #include int main(void) { std::cout << "Before thread" << std::endl; std::thread t([]() { sleep(1); std::cout << "In a thread." << std::endl; }); t.join(); std::cout << "After thread" << std::endl; }