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

[expr.prim.req.nested] Fix restriction on local parameters CWG2517 #5116

Closed
wants to merge 1 commit into from

Conversation

jensmaurer
Copy link
Member

Partially addresses #4830

This was discussed in #4832

@brevzin
Copy link
Contributor

brevzin commented Dec 27, 2021

Does this paragraph serve a purpose? @zygoloid asked that here and the only response was that it's indeed useless. Isn't the check on requires a == 0; already rejected by [expr.const]/5.9?

This also seems like a case that P2280 ought to address, making something like this valid:

struct A {
    constexpr int size() const { return 42; }
};

template <class T>
concept C = requires (T t) {
    requires t.size() > 10; 
};

static_assert(C<A>);  // only clang rejects, explicitly citing this rule
static_assert(C<A&>); // everyone rejects, but P2280 would presumably allow 

@jensmaurer
Copy link
Member Author

jensmaurer commented Dec 27, 2021

Isn't the check on requires a == 0; already rejected by [expr.const]/5.9?

Good point. This seems to be missing a core issue. I've asked for one.

@jensmaurer jensmaurer added the cwg Issue must be reviewed by CWG. label Dec 27, 2021
@tkoeppe tkoeppe removed their assignment Jan 21, 2022
@jensmaurer
Copy link
Member Author

jensmaurer commented Mar 31, 2022

See CWG2517

@jensmaurer jensmaurer changed the title [expr.prim.req.nested] Fix restriction on local parameters [expr.prim.req.nested] Fix restriction on local parameters CWG2517 Mar 31, 2022
@jensmaurer jensmaurer added the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Mar 31, 2022
@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jun 28, 2023
@frederick-vs-ja
Copy link
Contributor

Should have been superseded by #6118 (7a947d7).

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. needs rebase The pull request needs a git rebase to resolve merge conflicts. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants