home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Initialization {} of Aggregates with Static Members
- Message-ID: <1992Dec15.174330.23495@taumet.com>
- Organization: TauMetric Corporation
- References: <BzA5oG.Bwu@polstra.uucp>
- Date: Tue, 15 Dec 1992 17:43:30 GMT
- Lines: 25
-
- jdp@polstra.uucp (John Polstra) writes:
-
- |I'd like some opinions on something that the ARM doesn't seem to address
- |directly:
-
- | struct X {
- | int a;
- | static int b;
- | int c;
- | };
-
- | X foo = { 1, 3 };
-
- >I believe that this is legal, and that foo.a and foo.c should get
- >the values 1 and 3, respectively. Static member b should remain
- >uninitialized by the code shown here; it would have to be defined
- >exactly once elsewhere in the program.
-
- That is correct. The ARM is not clear on this point, but there is
- no question about what was intended. At the last C++ Committee
- meeting (November 1992, Boston) we voted in a clarification of
- the wording on this subject.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
-