Effect on original feature: Valic C++ 2026 code that declares a deallocation function
with a potentially throwing exception specification
becomes ill-formed.
[Example 1: struct T {voidoperatordelete(void*)noexcept(false); // ill-formed; previously well-formed};
— end example]
Effect on original feature: Some valid C++ 2026 code may fail to compile.
[Example 1: struct A {int a; };
struct B : A {int b; };
void f(A); // #1void f(B); // #2void g(){
f({.a=1}); // ambiguous between #1 and #2; previously called #1} — end example]
Change: It is no longer valid
for explicitly defaulted assignment operators to have a
cv-qualifier-seq or &&ref-qualifier, or
for an explicitly defaulted move assignment operator
to have a parameter of type “reference to T”
where T is cv-qualified.
Rationale: Removal of rarely-used and confusing feature.
Effect on original feature: A valid C++ 2026 program
which uses these features on an explicitly defaulted assignment operator
is ill-formed.
[Example 2: struct S {
S&operator=(const S&)&&=default; // ill-formed; previously well-formed};
struct T {
T&operator=(const T&)const=default; // ill-formed; previously well-formed but deleted};
struct U {
U&operator=(const U&&)=default; // ill-formed; previously well-formed but deleted};
— end example]