home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12700 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.4 KB  |  40 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: destruction of temporaries
  5. Message-ID: <1992Aug21.060630.6831@lth.se>
  6. Sender: newsuser@lth.se (LTH network news server)
  7. Organization: Department of Automatic Control, Lund, Sweden
  8. References: <1992Aug18.205211.16789@Warren.MENTORG.COM> <TMB.92Aug19113657@arolla.idiap.ch> <1992Aug19.111836.25070@lth.se> <1992Aug21.010755.17454@ucc.su.OZ.AU>
  9. Date: Fri, 21 Aug 1992 06:06:30 GMT
  10. Lines: 28
  11.  
  12. In <comp.lang.c++> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  13. >In article <...> dag@control.lth.se (Dag Bruck) writes:
  14. >>
  15. >>Given the deliberations for and against different models [no details
  16. >>given] I would probably prefer destruction at greatest enclosing
  17. >>expression, 
  18. >
  19. >    Do you mean the next semicolon? I think thats what
  20. >you just said isn't it?
  21.  
  22. Essentially yes, but my wording also applies to the initialization
  23. list of a constructor, which does not have a semicolon.
  24.  
  25. This is a good example why "standardeeze" is often hard to read.
  26.  
  27. >>with the additional constraint that temporaries created in
  28. >>one "arm" of a conditional expression are destroyed at the end of that
  29. >>conditional expression.
  30. >
  31. >    As a matter of interest, what is the status of
  32. >
  33. >    (a<b ? a : b )=1;
  34.                 ^   ^
  35. In my interpretation, any temporaries generated for the ?: expression
  36. would be destroyed at either of the positions marked with ^.
  37.  
  38.  
  39.         -- Dag
  40.