: If there is a use of an object with static storage
duration that does not happen before the object's destruction, the program has undefined
behavior
. Terminating every thread before a call to
std::exit or the exit from
main is sufficient, but not necessary, to satisfy these requirements
. These
requirements permit thread managers as static-storage-duration objects
. —
end note