On Tue, Jul 11, 2023 at 11:10:33 -0400, Tom Honermann wrote:On 7/11/23 10:23 AM, Ben Boeckel wrote:My probing question is: how to satisfy the ODR for the module initialization function called on `import`?What module initialization function? The standard doesn't specify one.Hmm. I can't find the wording that I remember, but it's about the rule that (maybe removed?) imported modules' statics are initialized before the importing module's globals.
Right, this is [basic.start.dynamic]/2.2 (http://eel.is/c++draft/basic.start#dynamic-2.2)
"A declaration D is
appearance-ordered before a declaration E
if ... the translation unit containing E
has an interface dependency on the translation unit containing D ..."