This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1806. Virtual bases and move-assignment

Section: 11.4.6  [class.copy.assign]     Status: CD4     Submitter: Richard Smith     Date: 2013-11-04

[Moved to DR at the November, 2014 meeting.]

The proposed resolution for issue 1402 overlooked some needed changes in 11.4.5.3 [class.copy.ctor] paragraph 28.

Proposed resolution (February, 2014):

Change 11.4.5.3 [class.copy.ctor] paragraph 28 as follows:

...It is unspecified whether subobjects representing virtual base classes are assigned more than once by the implicitly-defined copy/move assignment operator. [Example:

  struct V { };
  struct A : virtual V { };
  struct B : virtual V { };
  struct C : B, A { };

It is unspecified whether the virtual base class subobject V is assigned twice by the implicitly-defined copy/move assignment operator for C. —end example] [Note: This does not apply to move assignment, as a defaulted move assignment operator is deleted if the class has virtual bases. —end note]