Skip to content

Commit

Permalink
Add link to static init fiasco
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Oct 30, 2015
1 parent 3f7dda2 commit f523965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/src/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ There are few things to note about this. First, the call operator member functio

auto three = sum_f()(1, 2);

We can make it behave like a regular function if we construct the class as a global variable. The Fit library provides [`FIT_STATIC_FUNCTION`](function.md) to properly initialize the the function object at compile-time to avoid the static initialization order fiasco and possible ODR violations:
We can make it behave like a regular function if we construct the class as a global variable. The Fit library provides [`FIT_STATIC_FUNCTION`](function.md) to properly initialize the the function object at compile-time to avoid the [static initialization order fiasco](https://isocpp.org/wiki/faq/ctors#static-init-order) and possible ODR violations:

FIT_STATIC_FUNCTION(sum) = sum_f();

Expand Down

0 comments on commit f523965

Please sign in to comment.