This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112c. See for the official list.


1294. Side effects in dynamic/static initialization

Section:  [basic.start.static]     Status: open     Submitter: Daniel Krügler     Date: 2011-04-08

According to [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

This does not consider side effects of the initialization in this determination, only the values of namespace-scope variables.

CWG 2022-11-11

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.