C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Time of initialization of non-local objects, 3.6.2p3

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Al Grant
Guest





PostPosted: Wed Aug 06, 2003 4:07 pm    Post subject: Time of initialization of non-local objects, 3.6.2p3 Reply with quote



3.6.2p3 says about dynamic initialization of objects with namespace
scope:
"... If the initialization is deferred to some point in time
after the first statement of main, it shall occur before the
first use of any function or object defined in the same
translation unit as the object to be initialized."

Presumably if no object in that translation unit is used the only
requirement (from 3.7.1) is that if the program terminates normally,
the initialization must happen before that time?

Also, the wording implies that if a translation unit with a
dynamically
initialized object defines an inline function, which is also defined
elsewhere, uses of that function (anywhere) will require the unit's
objects to have been initialized. The function is, after all, defined
in that translation unit (among others). Surely that cannot be
intended? Should it be interpreted to mean "defined only"?

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.