[Example 1: bool stop(){returnfalse; }void busy_wait_thread(){while(!stop()); // undefined behavior, thread makes no progress but the loop}// is not trivial because stop() is not a constant expressionint main(){
std::thread t(busy_wait_thread);
t.join();
} — end example]