Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move_only_function takes one signature #5198

Closed
wants to merge 1 commit into from

Conversation

zhihaoy
Copy link
Contributor

@zhihaoy zhihaoy commented Jan 12, 2022

The pack (Args...) in the specializations does not need the main template to be variadic. A signature is just one type parameter.

The pack (`Args...`) in the specializations does not need the main template to be variadic. A signature is just one type parameter.
@JohelEGP
Copy link
Contributor

JohelEGP commented Jan 12, 2022

See #5013 (comment).
In case it doesn't show:
1641950693

@zhihaoy
Copy link
Contributor Author

zhihaoy commented Jan 12, 2022

See #5013 (comment).

Continued the thread there. The specification (synopsis) is a non-binding declaration. If an implementation has ABI concern, it can declare the main template in whatever way compiles.

@JohelEGP
Copy link
Contributor

Continued the thread there. The specification (synopsis) is a non-binding declaration. If an implementation has ABI concern, it can declare the main template in whatever way compiles.

I wonder if they considered adding a (normative) encouragement to make it variadic for implementations whose ABI would change. Not like that'd stop implementations from making it non-variadic, since it's just an encouragement. And then we'd have to get another template that's actually variadic, just like it happened with the lock guards. So it seems better to just make it variadic from the get-go.

@zhihaoy
Copy link
Contributor Author

zhihaoy commented Jan 12, 2022

I see; it's not editorial. using t = move_only_function<X, Y>; is legal code.

@zhihaoy zhihaoy closed this Jan 12, 2022
@zhihaoy zhihaoy deleted the patch-1 branch January 12, 2022 02:48
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.

None yet

2 participants