Skip to content

[func.wrap.ref.ctor] Restore class T in constant_wrapper constructor head#9144

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-funcref-constant-wrapper-ctor-class-t
Jun 17, 2026
Merged

[func.wrap.ref.ctor] Restore class T in constant_wrapper constructor head#9144
tkoeppe merged 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-funcref-constant-wrapper-ctor-class-t

Conversation

@abhinavagarwal07

@abhinavagarwal07 abhinavagarwal07 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Restore the missing class T template parameter in the out-of-line function_ref constructor declaration so it matches the synopsis.

…head

The out-of-line declaration of the function_ref constructor taking a
constant_wrapper<c, F> and a cv T* object pointer is headed with only
template<auto c, class F>, but its function parameter (cv T* obj) and
Constraints element (is-invocable-using<const F&, cv T*>) both name T,
which is then undeclared. The class synopsis in [func.wrap.ref.class]
already declares it as template<auto c, class F, class T>. Restore
class T to the out-of-line head so it matches the synopsis.
@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Jun 17, 2026
@tkoeppe

tkoeppe commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Thanks! How was this lost in the first place...

@tkoeppe

tkoeppe commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Misapplication of P3948R1 via c8178e6. (Instead of adding class F, , the edit changed T to F.

@tkoeppe tkoeppe merged commit 14ed707 into cplusplus:main Jun 17, 2026
2 checks passed
@jwakely

jwakely commented Jun 17, 2026

Copy link
Copy Markdown
Member

The good news is that P4206R0 (Brno LWG poll 5) doesn't touch this again, so won't conflict with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants