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

[temp.func.order] Specify to only add extra first argument if needed CWG2834 #6808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HoBoIs
Copy link

@HoBoIs HoBoIs commented Feb 15, 2024

In [temp.func.order] paragraph 3, it is written that we need to add a new first parameter for all member functions for the purposes of template deduction. However, it only makes sense if we have an implicit object parameter.

If we don't have an implicit object parameter, we shouldn't add a new first parameter because all of our parameters explicitly are written.

@HoBoIs
Copy link
Author

HoBoIs commented Mar 14, 2024

@jwiegley could you take a look, or recommend someone who can take a look?

@jwiegley
Copy link
Contributor

I haven't been involved with the C++ standard for 10 years now, I do not have any current recommendations.

@jensmaurer
Copy link
Member

Please squash the commits and force-push.

This looks like a CWG defect to me.

@jensmaurer jensmaurer added the cwg Issue must be reviewed by CWG. label Mar 14, 2024
…t if we don't have an explicit object argument

In [temp.func.order] paragraph 3, it is written that we need to add a new first parameter for all member functions for the purposes of template deduction. However, it only makes sense if we don't have an explicit object parameter.

If we have an explicit object parameter, we shouldn't add a new (implicit) first parameter because our first parameter is explicitly written.
@HoBoIs
Copy link
Author

HoBoIs commented Mar 19, 2024

@jensmaurer
I have squashed and force-pushed them.

@HoBoIs
Copy link
Author

HoBoIs commented Mar 22, 2024

@jensmaurer
I see you wrote that this looks like a CWG defect. Is there anything I should do with it? Should I report it elsewhere then?

@HoBoIs
Copy link
Author

HoBoIs commented Apr 10, 2024

This open cwg defect solves the same problem, by suggesting the same change (and some more for static member functions). So I think my change does not need to be a separate thing on its own.

@jensmaurer jensmaurer changed the title [temp.func.order] Specify to only add extra first argument if needed [temp.func.order] Specify to only add extra first argument if needed CWG2834 Apr 10, 2024
@jensmaurer
Copy link
Member

CWG2834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants