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

2026-09-01


3223. Undefined behavior for constructor preconditions and destructor postconditions

Section: 11.9.3  [class.base.init]     Status: open     Submitter: Joshua Berne     Date: 2026-07-15

(From submission #948.)

The phrasing in 11.9.3 [class.base.init] paragraph 18 is missing (intended) restrictions on which constructors and destructors are in scope.

Suggested resolution:

Change in 11.9.3 [class.base.init] paragraph 18 as follows:

Member functions (including virtual member functions, 11.7.3 [class.virtual]) can be called for an object under construction or destruction. Similarly, an object under construction or destruction can be the operand of the typeid operator (7.6.1.8 [expr.typeid]) or of a dynamic_cast (7.6.1.7 [expr.dynamic.cast]). However, if these operations are performed during evaluation of the program has undefined behavior (F.6.3 [ub:class.base.init.mem.fun]).