P2953R4 — Forbid defaulting operator=(X&&) && (3 items) SG17
Matthew Taylor, Arthur O'Dwyer
Current C++ permits explicitly-defaulted special members to differ from their implicitly-defaulted counterparts by adding ref-qualifiers, allowing implausible declarations like A& operator=(const A&) && = default where the left-hand operand is rvalue-ref-qualified. This paper proposes forbidding such declarations for explicitly defaulted copy/move assignment operators, presenting two approaches: a preferred 'ambitious' approach that makes the problematic declarations ill-formed, and a conservative alternative that makes them defaulted-as-deleted. The proposal also addresses related arcane signatures such as cv-qualified assignment operators and move assignment operators with cv-qualified non-object parameters.

References — Anthropic Citations API

[1]
"Arthur O'Dwyer presented P2592R1 (not P2953, but P2952) in the EWG telecon of 2025-01-08."
[2] chars 3191–3581
"``` struct C { C& operator=(const C&) && = default; // C++26: Well-formed // Proposed: Unusable (deleted or ill-formed) }; struct D { D& operator=(this D&& self, const C&) = default; // C++26:..."
[3] chars 7638–8718
"URL Code Clang GCC MSVC EDG Correct Proposed(conservative) Proposed(preferred) link ``` C& operator=(C&) = default; ``` ✓ ✓ ✓ ✓ ✓ ✓ ✓ link ``` C& operator=(const C&&) =..."
Summary: P2953R4 proposes making defaulted assignment operators with ref-qualified object parameters (e.g., operator=(X&&) &&) ill-formed or deleted, on the grounds that such defaulted operators are unusable. It provides wording changes to [class.copy.assign] and [dcl.fct.def.default] to implement this restriction.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.