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

2025-09-28


3041. Overly aggressive rule for deleting the destructor of a union

Section: 11.4.7  [class.dtor]     Status: open     Submitter: Barry Revzin     Date: 2025-07-03

(From submission #722.)

Paper P3074R7 added an overly aggressive rule to delete destructors of unions, making the following example have a deleted destructor:

  union U {
    U(int i) : i(i) { }
    int i;
  };

Suggested resolution:

Change in 11.4.7 [class.dtor] paragraph 7 as follows:

A defaulted destructor for a class X is defined as deleted if