Article View: comp.std.c++
Article #3156Re: FW: FW: Inherent C++ problem?
From: Bernd Anhaeupl
Date: Fri, 26 Jan 1996 16:48
Date: Fri, 26 Jan 1996 16:48
44 lines
2100 bytes
2100 bytes
In article <01BAEB16.3DF53D40@dino.int.com> Eugene Lazutkin <eugene@int.com> writes:
> Here is part of the relevent section in the draft standard:
>
> 12.2 Temporary objects
> While evaluating an expression, it might be necessary or convenient
> for an implementation to generate temporary objects to hold values
> resulting from the evaluation of the expression's subexpressions.
> During this evaluation, precisely when such temporaries are
> introduced is unspecified.
Well, I guess it is exactly the "not explicit enough" thing, at least
when related to the case I described:
Foo foo()
{
return Foo( ...... );
}
Foo( ..... ) is a full expression rather than subexpression. So, is the
implementation _required_ to instantiate _this_ temporary under the
current standard?
What do you mean with _this_ temporary?
a) return value: i.e.
Foo return_value ( ..... );
or
b) additional temporary:
Foo tmp( ......);
Foo return_value(tmp);
--
Bernd Anhaeupl Tel.: +49 9131 857787
LATE - Uni Erlangen
Cauerstr. 7 Email: anhaeupl@late.e-technik.uni-erlangen.de
91058 Erlangen
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4eb005$46s@rznews.rrze.uni-erlangen.de>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<01BAEB16.3DF53D40@dino.int.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: anhaeupl@late.e-technik.uni-erlangen.de (Bernd Anhaeupl) Newsgroups: comp.std.c++ Subject: Re: FW: FW: Inherent C++ problem? Date: 26 Jan 1996 16:48:16 GMT Organization: LATE, Uni. Erlangen-Nuernberg, Germany Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <4eb005$46s@rznews.rrze.uni-erlangen.de> References: <01BAEB16.3DF53D40@dino.int.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: late2.e-technik.uni-erlangen.de In-Reply-To: Eugene Lazutkin's message of 26 Jan 96 04:53:37 GMT Content-Length: 1185 X-Lines: 40 Originator: clamage@taumet