https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118239

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note GCC 6.5.0 used to reject this:
```
<source>: In constructor 'constexpr NoMut3::NoMut3(int, int)':
<source>:4:49: error: call to non-constexpr function 'NoMut1::NoMut1()'
   constexpr NoMut3(int a, int b) /*: NoMut1()*/ {}
                                                 ^
<source>:2:8: note: 'NoMut1::NoMut1()' is not usable as a constexpr function
because:
 struct NoMut1 { int a, b; };
        ^~~~~~
<source>:2:21: note: defaulted default constructor does not initialize 'int
NoMut1::a'
 struct NoMut1 { int a, b; };
                     ^
<source>:2:24: note: defaulted default constructor does not initialize 'int
NoMut1::b'
 struct NoMut1 { int a, b; };
                        ^
<source>: In function 'void mutable_subobjects()':
<source>:7:28: error: 'constexpr NoMut3::NoMut3(int, int)' called in a constant
expression
   constexpr NoMut3 nm3(1, 2);
                            ^
```

Reply via email to