r/wg21
P2285R1 - Are default function arguments in the immediate context? WG21
Posted by u/former_overload_resolution_victim · 5 hr. ago

Document: P2285R1 — Are default function arguments in the immediate context?

Author: Andrzej Krzemieński, Tomasz Kamiński

Date: 2026-02-23

Audience: EWG Evolution

This paper is about whether substitution failures in default function arguments (and related defaults) belong in the immediate context for SFINAE and concept checking, or whether they should be hard errors. Compiler behavior diverges today, which makes portable generic code surprisingly fragile when it accidentally depends on a default. The authors survey that divergence and recommend standardizing the more SFINAE-friendly behavior. Primary text: wg21.link/p2285r1 and the 2026-02 mailing copy.

▲ 142 points (91% upvoted) · 0 comments
sorted by: best