Skip to content

Conversation

@hewillk
Copy link
Contributor

@hewillk hewillk commented Sep 10, 2025

Use ArgTypes instead of Args to match the current class signature.
Also, R (*thunk-ptr)(BoundEntityType, Args&&...) should be ArgTypes... since there is no Args....

@tkoeppe tkoeppe requested a review from jwakely October 31, 2025 14:38
Copy link
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first change (in the class synopsis) is required, that's a wording bug.

The other changes aren't strictly necessary, because we're talking about some class function_ref<R(Args...) cx noexcept(noex)> for some set of template arguments We're not referring to the same ArgTypes as declared in the template-head of the class synopsis. As long as the rest of the paragraph is consistent with the start of p1, it's fine.

But the change seems fine anyway, it certainly does no harm.

@tkoeppe
Copy link
Contributor

tkoeppe commented Oct 31, 2025

I'd mildly prefer the simpler change in that case to only fix the thing that's broken. We don't need the additional verbosity.

@hewillk
Copy link
Contributor Author

hewillk commented Oct 31, 2025

I'd mildly prefer the simpler change in that case to only fix the thing that's broken. We don't need the additional verbosity.

I don't think this is verbosity; I think it's an enhancement. Because it matches the exact signature of the function, which I did intentionally.

Other places in [func.wrap] named Args... are template parameters for constructing internal callable objects, not template parameters for operator().

The function, copyable_function, move_only_function, and function_ref all consistently use the template name ArgTypes....

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants