Created on 2011-04-08.00:00:00 last changed 2 weeks ago
The precise normative identification of side effects relevant for the rule remains open. An approach similar to the constexpr model of considering the transitive hull of evaluations might be applicable.
According to 220.127.116.11 [basic.start.static] paragraph 3,
An implementation is permitted to perform the initialization of a non-local variable with static storage duration as a static initialization even if such initialization is not required to be done statically, provided that
the dynamic version of the initialization does not change the value of any other object of namespace scope prior to its initialization, and
the static version of the initialization produces the same value in the initialized variable as would be produced by the dynamic initialization if all variables not required to be initialized statically were initialized dynamically.
This does not consider side effects of the initialization in this determination, only the values of namespace-scope variables.
|2022-11-20 07:54:16||admin||set||messages: + msg7028|
|2022-02-18 07:47:23||admin||set||status: drafting -> open|