🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Eugene Lazutkin Fri, 26 Jan 1996 04:53
FW: FW: Inherent C++ problem?
#3113
Author: Eugene Lazutkin
Date: Fri, 26 Jan 1996 04:53
33 lines
1602 bytes
----------
From: 	Max Motovilov[SMTP:max@int.com]
Sent: 	Thursday, January 25, 1996 11:11 AM
To: 	'Eugene Lazutkin'
Subject: 	RE: FW: Inherent C++ problem?

> 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?

Regards,
...Max...
---
[ 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. ]
Re: FW: FW: Inherent C++ problem?
#3156
Author: Bernd Anhaeupl
Date: Fri, 26 Jan 1996 16:48
44 lines
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. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads