Liste des Groupes | Revenir à cl c++ |
On 31.03.2025 12:09, Muttley@DastardlyHQ.org wrote:
"If [initialization] is deferred, it strongly happens before any
non-initialization odr-use of any non-inline function or non-inline
variable defined in the same translation unit as the variable to be
initialized."
The keyword here is "non-initialization use". If you access your myobj
from main() it would be a non-initialization use, which is guaranteed to
trigger the needed initialization if needed, so everything will work fine.
Les messages affichés proviennent d'usenet.