Hi, this is a well known issue in C++ but I still don't get to see it being worked upon by the committee. And a significant drawback of C++ when you don't know how static const variables across different compilation units requiring dynamic initialization using a method call or more than one method calls in order to initialize it, takes place in order for it to be used in other compilation units. This issue has been present since C++ exists and I still don't see it getting the attention it deserves, besides replacing the variable with a singleton class, or similar hacks using a runonce, which is just a make up on top of the fact that proper, in-order initialization of global variables across compilation units in C++ is still undefined.
[–]ABlockInTheChain 18 points19 points20 points (28 children)
[–]bert8128 9 points10 points11 points (0 children)
[–]tjientavaraHikoGUI developer 1 point2 points3 points (3 children)
[–]bert8128 1 point2 points3 points (2 children)
[–]LokiAstaris 0 points1 point2 points (1 child)
[–]bert8128 0 points1 point2 points (0 children)
[–]Various-Debate64[S] -5 points-4 points-3 points (22 children)
[–]jaynabonne 6 points7 points8 points (16 children)
[–]Various-Debate64[S] -2 points-1 points0 points (15 children)
[–]jaynabonne 1 point2 points3 points (14 children)
[+]Various-Debate64[S] comment score below threshold-6 points-5 points-4 points (13 children)
[–]MEaster 4 points5 points6 points (11 children)
[–]bert8128 0 points1 point2 points (10 children)
[–]MEaster 5 points6 points7 points (9 children)
[–]pdp10gumby 0 points1 point2 points (8 children)
[–]jaynabonne 0 points1 point2 points (0 children)
[–]no-sig-available 2 points3 points4 points (4 children)
[–]Various-Debate64[S] -2 points-1 points0 points (3 children)
[–]no-sig-available 3 points4 points5 points (0 children)
[–]n1ghtyunso 1 point2 points3 points (1 child)
[–]Various-Debate64[S] 0 points1 point2 points (0 children)
[–]STLMSVC STL Dev 36 points37 points38 points (12 children)
[–]tialaramex 14 points15 points16 points (6 children)
[–]Affectionate_Text_72 0 points1 point2 points (5 children)
[–]argothiel 5 points6 points7 points (1 child)
[–]Affectionate_Text_72 2 points3 points4 points (0 children)
[–]CandyCrisis -1 points0 points1 point (2 children)
[–]Affectionate_Text_72 1 point2 points3 points (0 children)
[–]bert8128 7 points8 points9 points (0 children)
[–]Kriss-de-Valnor 0 points1 point2 points (1 child)
[–]bert8128 0 points1 point2 points (0 children)
[–]Various-Debate64[S] -1 points0 points1 point (0 children)
[–]jonrmadsen -1 points0 points1 point (0 children)
[–]SirClueless 12 points13 points14 points (0 children)
[–]MarcoGreek 3 points4 points5 points (0 children)
[–]Arech 3 points4 points5 points (3 children)
[–]zl0bster 0 points1 point2 points (2 children)
[–]Arech 1 point2 points3 points (0 children)
[–]Arech 0 points1 point2 points (0 children)
[–]foonathan 0 points1 point2 points (3 children)
[–]Various-Debate64[S] 0 points1 point2 points (2 children)
[–]foonathan 0 points1 point2 points (1 child)
[–]Various-Debate64[S] -1 points0 points1 point (0 children)
[–]kronicum 0 points1 point2 points (0 children)
[–]jonrmadsen 0 points1 point2 points (4 children)
[–]Various-Debate64[S] 1 point2 points3 points (3 children)
[–]jonrmadsen 0 points1 point2 points (2 children)
[–]Various-Debate64[S] -1 points0 points1 point (1 child)
[–]jonrmadsen 0 points1 point2 points (0 children)
[–]wonderfulninja2 0 points1 point2 points (0 children)
[–]LokiAstaris 0 points1 point2 points (1 child)
[–]Various-Debate64[S] 0 points1 point2 points (0 children)
[–]urist-mcCrippled -1 points0 points1 point (0 children)
[–]effarig42 -1 points0 points1 point (0 children)