Title
Uninitialized subobjects as a result of an immediate invocation
Status
open
Section
7.7 [expr.const]
Submitter
Aaron Ballman

Created on 2022-03-29.00:00:00 last changed 2 months ago

Messages

Date: 2022-03-29.18:46:44

Consider:

  struct A {
    int n;
    constexpr A() {}
  };
  constexpr A a; // implementations reject

Paper P1331R2 (Permitting trivial default initialization in constexpr contexts) dropped the restriction that immediate invocations cannot yield results with some subobjects left uninitialized. It is unclear whether that change was intentional or accidental.

This issue is closely related to issue 2536.

History
Date User Action Args
2022-03-29 00:00:00admincreate