Title
Lazy declaration of special members vs overload errors
Status
drafting
Section
11.4.5.3 [class.copy.ctor]
Submitter
Richard Smith

Created on 2012-12-06.00:00:00 last changed 135 months ago

Messages

Date: 2013-09-15.00:00:00

Notes from the September, 2013 meeting:

The problem with this approach is that hard errors (not in the immediate context) can occur, affecting portability. There are some cases, such as a virtual assignment operator in the base class, where lazy evaluation cannot be done, so it cannot be mandated.

Date: 2013-03-15.00:00:00

Additional note (March, 2013):

See also issue 1360.

Date: 2012-12-06.00:00:00

The implicit declaration of a special member function sometimes requires overload resolution, in order to select a special member to use for base classes and non-static data members. This can be required to determine whether the member is or would be deleted, and whether the member is trivial, for instance. The standard appears to require such overload resolution be performed at the end of the definition of the class, but in practice, implementations perform it lazily. This optimization appears to be non-conforming, in the case where overload resolution would hit an error. In order to enable this optimization, such errors should be “no diagnostic required.”

History
Date User Action Args
2013-10-14 00:00:00adminsetmessages: + msg4631
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-03-18 00:00:00adminsetmessages: + msg4291
2012-12-06 00:00:00admincreate