Skip to content

Prevent static initialization order fiasco for all class constants #3321

@scpeters

Description

@scpeters

There is a possibility of static initialization order fiasco when the order in which objects with static storage duration are initialized is ambiguous (see example code to reproduce the problem). Several classes were updated recently to use constexpr for initializing static constants, and these fixes should be applied to other class constants as well:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions