In this passage on program exit from cppreference.com
If the completion of the constructor or dynamic initialization for thread-local or static object A was sequenced-before thread-local or static object B, the completion of the destruction of B is sequenced-before the start of the destruction of A
what is the meaning of "sequenced-before"?
In particular, for this program
struct Object {
Object() {
}
~Object() {
}
};
Object a;
void f() {
static Object b;
}
int main() {
f();
}
is it safe to assume that a.~Object()
is called after b.~Object()
because a.Object()
is called before b.Object()
?