
5 Feb
2007
5 Feb
'07
9:54 p.m.
AMDG Andreas Huber <ahd6974-spamgroupstrap <at> yahoo.com> writes:
Steven Watanabe wrote:
GetPodInstance() is probably safe, but the standard does not require it. "A local object of POD type (3.9) with static storage duration initialized with constant-expressions is initialized before its block is first entered." (6.7/4)
Interesting, from the wording above I would have concluded that the standard *does* require it.
To be safe the compiler would have to initialize the object statically. i.e. before any code whatsoever is executed. The wording does not require that. In Christ, Steven Watanabe