home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!sunic!lth.se!newsuser
- From: dag@control.lth.se (Dag Bruck)
- Subject: Re: destruction of temporaries
- Message-ID: <1992Aug21.060630.6831@lth.se>
- Sender: newsuser@lth.se (LTH network news server)
- Organization: Department of Automatic Control, Lund, Sweden
- References: <1992Aug18.205211.16789@Warren.MENTORG.COM> <TMB.92Aug19113657@arolla.idiap.ch> <1992Aug19.111836.25070@lth.se> <1992Aug21.010755.17454@ucc.su.OZ.AU>
- Date: Fri, 21 Aug 1992 06:06:30 GMT
- Lines: 28
-
- In <comp.lang.c++> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- >In article <...> dag@control.lth.se (Dag Bruck) writes:
- >>
- >>Given the deliberations for and against different models [no details
- >>given] I would probably prefer destruction at greatest enclosing
- >>expression,
- >
- > Do you mean the next semicolon? I think thats what
- >you just said isn't it?
-
- Essentially yes, but my wording also applies to the initialization
- list of a constructor, which does not have a semicolon.
-
- This is a good example why "standardeeze" is often hard to read.
-
- >>with the additional constraint that temporaries created in
- >>one "arm" of a conditional expression are destroyed at the end of that
- >>conditional expression.
- >
- > As a matter of interest, what is the status of
- >
- > (a<b ? a : b )=1;
- ^ ^
- In my interpretation, any temporaries generated for the ?: expression
- would be destroyed at either of the positions marked with ^.
-
-
- -- Dag
-