C++ Logo

sg15

Advanced search

Re: Provide build systems with ways to build the std(.compat) modules

From: Daniela Engert <dani_at_[hidden]>
Date: Wed, 12 Jul 2023 08:21:38 +0200
Am 11.07.2023 um 20:44 schrieb Ben Boeckel via SG15:
> 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 ..."


Received on 2023-07-12 06:22:01