Liste des Groupes | Revenir à cl c++ |
On 30.03.2025 18:30, Muttley@DastardlyHQ.org wrote:On Sun, 30 Mar 2025 10:38:57 -0400>
James Kuyper <jameskuyper@alumni.caltech.edu> wibbled:Section 6.9.3.3 does in fact impose many constraints on the sequence in
which non-local objects with static storage duration get initialized.
However, all of the sequence requirements are only between objects
defined in the same translation unit. Also, it's implementation-defined
which of those initializations occur before the start of main().
Initialising global objects before main is an absolute must otherwise how
are you expected to use them safely? They're not in the code for decoration.
Initializing global objects before main is not possible with
demand-loaded dynamically loaded libraries.
Les messages affichés proviennent d'usenet.