vendredi 3 mars 2017

Does C++11 specify the construction sequence of static/global variables?

In old C++, the construction of static objects(in files, in classes, in functions) has no specified sequence, one static object cannot assume it's constructed after or before another static object, seem to be decided by linker.

My question is does c++ 11/14 specify any rules for the construction sequences of static objects and global objects?

Thanks!

Aucun commentaire:

Enregistrer un commentaire