🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2044

Re: Questions concerning initialization of nonlocals

#2044
From: Wesley E. Munsil
Date: Tue, 26 Sep 1995 19:51
26 lines
1532 bytes
ajay@lehman.com (Ajay Kamdar) wrote:

..

>If the static object above were not in the same translation unit as main(),
>then a copule of other possibilities exist. In such a situation,
>theoritically, the ctor could be executed some time before the start of
>main(), OR it could be deferred to any point in time before the first use
>of an object or function in that translation unit.

..

On the contrary, a noted compiler vendor, active on the committee, has told me
that this was rendered inoperative at the last meeting -- in fact, the
constructor call may occur AFTER the use of some object or function in the
translation unit, since enforcing the policy stated in the DWP is "impossible".

Thus, my questions.  Will the standard impose any constraints as to the time at
or by which the call must occur?


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <MATT.95Sep26125140@physics2.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <DFHC1v.Kq5@peacock.tcinc.com> <MATT.95Sep26094918@physics2.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: "Wesley E. Munsil" <wmunsil@tcinc.com>
Newsgroups: comp.std.c++
Subject: Re: Questions concerning initialization of nonlocals
Date: 26 Sep 1995 19:51:40 GMT
Organization: Tele-Communications, Inc.
Approved: matt@physics2.Berkeley.EDU (Matt Austern)
Message-ID: <MATT.95Sep26125140@physics2.Berkeley.EDU>
References: <DFHC1v.Kq5@peacock.tcinc.com> <MATT.95Sep26094918@physics2.Berkeley.EDU>
NNTP-Posting-Host: physics2.berkeley.edu