Full name of submitter (unless configured in github; will be published with the issue): Yin Xinyu
[basic.start.term]/3 says
... The destruction of a complete object with static storage duration and having constant destruction is sequenced after the destruction of any other complete object with static storage duration and after any call to a function passed to std::atexit. ...
It's weird to involve usual calls to registered functions rather than merely calls caused by a call to std::exit. See [basic.start.term]/1
Constructed complete objects with static storage duration are destroyed and functions registered with std::atexit are called as part of a call to std::exit. The call to std::exit is sequenced before the destructions and the registered functions.
Suggested resolution:
Edit [basic.start.term]/3
... The destruction of a complete object with static storage duration and having constant destruction is sequenced after the destruction of any other complete object with static storage duration and after any call to aregistered functions caused by a call to std::exit passed to std::atexit. ...
Full name of submitter (unless configured in github; will be published with the issue): Yin Xinyu
[basic.start.term]/3 says
It's weird to involve usual calls to registered functions rather than merely calls caused by a call to
std::exit. See [basic.start.term]/1Suggested resolution:
Edit [basic.start.term]/3