Skip to content

Commit 03d1a0a

Browse files
ferdymercurydpiparo
authored andcommitted
Fix link
1 parent e102df2 commit 03d1a0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manual/cling/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,8 @@ next screen.
931931

932932
### Static Initialization Order Fiasco
933933

934-
When using the Cling interpreter, the lifetime of static variables is controlled, because of the lazy initialization (the variable is initialized the first time the function is called, and destroyed deterministically too). With static members, you often run into the [Static Initialization Order Fiasco] like in this issue. When multiple translation units have static variables, the order of their initialization is undefined. This can lead to runtime bugs if one static depends on another that hasn't yet been initialized.
934+
When using the Cling interpreter, the lifetime of static variables is controlled, because of the lazy initialization (the variable is initialized the first time the function is called, and destroyed deterministically too).
935+
With static members, you often run into the [Static Initialization Order Fiasco](https://en.cppreference.com/w/cpp/language/siof.html) like in this issue.
936+
When multiple translation units have static variables, the order of their initialization is undefined. This can lead to runtime bugs if one static depends on another that hasn't yet been initialized.
935937

936938
Thus, in Cling, it's strongly encouraged to avoid static const member variables and prefer static member functions that return references to static objects, or static non-const variables.

0 commit comments

Comments
 (0)