P2952R4 — Deduced return types for defaulted operator functions
Arthur O'Dwyer, Matthew Taylor
CWG
Revisions R4Oct 2026R3Sep 2026
Current C++ forbids explicitly defaulted functions to have placeholder return types such as `auto&`, except for C++20’s `operator<=>`. We remove this syntactic restriction in cases where the deduced return type would be the same as the expected one. This allows more consistency and less repetition when declaring defaulted functions.