home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 18004 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.0 KB  |  36 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: Initialization {} of Aggregates with Static Members
  5. Message-ID: <1992Dec15.174330.23495@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <BzA5oG.Bwu@polstra.uucp>
  8. Date: Tue, 15 Dec 1992 17:43:30 GMT
  9. Lines: 25
  10.  
  11. jdp@polstra.uucp (John Polstra) writes:
  12.  
  13. |I'd like some opinions on something that the ARM doesn't seem to address
  14. |directly:
  15.  
  16. |    struct X {
  17. |    int a;
  18. |    static int b;
  19. |    int c;
  20. |    };
  21.  
  22. |    X foo = { 1, 3 };
  23.  
  24. >I believe that this is legal, and that foo.a and foo.c should get
  25. >the values 1 and 3, respectively.  Static member b should remain
  26. >uninitialized by the code shown here; it would have to be defined
  27. >exactly once elsewhere in the program.
  28.  
  29. That is correct.  The ARM is not clear on this point, but there is
  30. no question about what was intended.  At the last C++ Committee
  31. meeting (November 1992, Boston) we voted in a clarification of
  32. the wording on this subject.
  33. -- 
  34.  
  35. Steve Clamage, TauMetric Corp, steve@taumet.com
  36.