Title
Should the optimization that allows a class object to alias another object also allow the case of a parameter in an inline function to alias its argument?
Status
nad
Section
11.9.6 [class.copy.elision]
Submitter
unknown

Created on 1998-10-24.00:00:00 last changed 18 months ago

Messages

Date: 2002-10-15.00:00:00

[Picked up by evolution group at October 2002 meeting.]

Date: 2023-05-12.20:59:33

Rationale (2023-05-12):

This is an extension that needs a paper targeted at EWG.

Date: 2008-06-15.00:00:00

Notes from the June, 2008 meeting:

The CWG decided to take no action on this issue until an interested party produces a paper with analysis and a proposal.

Date: 2008-03-15.00:00:00

Note (March, 2008):

The Evolution Working Group has accepted the intent of this issue and referred it to CWG for action (not for C++0x). See paper J16/07-0033 = WG21 N2173.

Date: 2022-11-20.07:54:16
(See also paper J16/99-0005 = WG21 N1182.)

At the London meeting, 11.4.5.3 [class.copy.ctor] paragraph 31 was changed to limit the optimization described to only the following cases:

  • the source is a temporary object
  • the return value optimization
One other case was deemed desirable as well:
  • aliasing a parameter in an inline function call to the function call argument.
However, there are cases when this aliasing was deemed undesirable and, at the London meeting, the committee was not able to clearly delimit which cases should be allowed and which ones should be prohibited.

Can we find an appropriate description for the desired cases?

Rationale (04/99): The absence of this optimization does not constitute a defect in the Standard, although the proposed resolution in the paper should be considered when the Standard is revised.

History
Date User Action Args
2023-05-12 20:59:33adminsetstatus: open -> nad
2008-06-29 00:00:00adminsetmessages: + msg1710
2008-03-17 00:00:00adminsetmessages: + msg1609
2008-03-17 00:00:00adminsetstatus: extension -> open
2002-11-08 00:00:00adminsetmessages: + msg798
1999-09-14 00:00:00adminsetmessages: + msg202
1999-09-14 00:00:00adminsetstatus: drafting -> extension
1998-10-24 00:00:00admincreate