public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103865] New: virtual function can have a requires clause
@ 2021-12-30 9:57 fchelnokov at gmail dot com
2021-12-30 10:03 ` [Bug c++/103865] " pinskia at gcc dot gnu.org
2022-05-24 8:23 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: fchelnokov at gmail dot com @ 2021-12-30 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103865
Bug ID: 103865
Summary: virtual function can have a requires clause
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fchelnokov at gmail dot com
Target Milestone: ---
A virtual function cannot have a requires clause, but GCC allows it to have:
```
struct A {
virtual void foo() {}
};
template<class T>
struct B : A {
void foo() requires true {}
};
int main() {
B<void> b;
}
```
Both Clang and MSVC refuse to accept it. Demo:
https://gcc.godbolt.org/z/fEj6Wq53E
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/103865] virtual function can have a requires clause
2021-12-30 9:57 [Bug c++/103865] New: virtual function can have a requires clause fchelnokov at gmail dot com
@ 2021-12-30 10:03 ` pinskia at gcc dot gnu.org
2022-05-24 8:23 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30 10:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103865
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-12-30
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Note GCC does reject the code if the constraint is false.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/103865] virtual function can have a requires clause
2021-12-30 9:57 [Bug c++/103865] New: virtual function can have a requires clause fchelnokov at gmail dot com
2021-12-30 10:03 ` [Bug c++/103865] " pinskia at gcc dot gnu.org
@ 2022-05-24 8:23 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-24 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103865
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
See Also|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=105699 |
Blocks| |67491
Status|NEW |RESOLVED
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
PR 105699 is a dup of this one, but since it has more details and examples
there, let's close this one instead.
*** This bug has been marked as a duplicate of bug 105699 ***
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-24 8:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 9:57 [Bug c++/103865] New: virtual function can have a requires clause fchelnokov at gmail dot com
2021-12-30 10:03 ` [Bug c++/103865] " pinskia at gcc dot gnu.org
2022-05-24 8:23 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).