home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12701 < prev    next >
Encoding:
Text File  |  1992-08-20  |  850 b   |  31 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!sunic!lth.se!newsuser
  3. From: dag@control.lth.se (Dag Bruck)
  4. Subject: Re: con/destruction of fundamental type
  5. Message-ID: <1992Aug21.061457.7511@lth.se>
  6. Sender: newsuser@lth.se (LTH network news server)
  7. Organization: Department of Automatic Control, Lund, Sweden
  8. References: <1992Aug20.161921.11717@ericsson.se>
  9. Date: Fri, 21 Aug 1992 06:14:57 GMT
  10. Lines: 19
  11.  
  12. In <comp.lang.c++> jonas@beppe.ericsson.se writes:
  13. >
  14. >I have tried this small example with both HP and Sun CC but both claim
  15. >than con/destruction as defined is illegal.
  16. >
  17. >main(){
  18. >  int i, *p = &i;
  19. >
  20. >  p->int::int(1);
  21. >  p->int::~int();
  22. >}
  23.  
  24. Explicit destruction of a built-in type is legal, see ARM 12.4, page
  25. 280.  I didn't find any example for the constructor, but I'm cretain
  26. it's legal.
  27.  
  28. Conclusion: the compilers are wrong.
  29.  
  30.         -- Dag
  31.