P3961R1 — Less double indirection in function_ref (RU-220)
Zhihao Yuan
LWG
Revisions R1Apr 2026R0Jan 2026
RU-220 calls for allowing skipping indirections when constructing `function_ref` to improve codegen. The proposed change in LWG 4264<sup>[1]</sup> is not strictly an optimization because certain behaviors with and without the change are visible, therefore, need to be made unspecified. This paper (P3961) suggests that, in addition to the change, a subset of the "optimized" cases should be mandated.