public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107981] New: 'operator auto' has not been declared in base
@ 2022-12-05 20:57 egor.pugin at gmail dot com
2022-12-05 21:02 ` [Bug c++/107981] " egor.pugin at gmail dot com
2022-12-05 21:04 ` egor.pugin at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: egor.pugin at gmail dot com @ 2022-12-05 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107981
Bug ID: 107981
Summary: 'operator auto' has not been declared in base
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: egor.pugin at gmail dot com
Target Milestone: ---
struct a {
operator auto() { return 1; }
};
struct b : a {
using a::operator auto;
};
gives
<source>:5:23: error: 'operator auto' has not been declared in 'struct a'
5 | using a::operator auto;
| ^~~~
Exerything is fine for clang/msvc.
https://godbolt.org/z/cTnxs97r6
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107981] 'operator auto' has not been declared in base
2022-12-05 20:57 [Bug c++/107981] New: 'operator auto' has not been declared in base egor.pugin at gmail dot com
@ 2022-12-05 21:02 ` egor.pugin at gmail dot com
2022-12-05 21:04 ` egor.pugin at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: egor.pugin at gmail dot com @ 2022-12-05 21:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107981
--- Comment #1 from Egor Pugin <egor.pugin at gmail dot com> ---
Also see following test cases.
===
ok for gcc
struct a {
operator auto();
};
struct b : a {
using a::operator auto;
};
===
not ok for gcc&clang, ok for msvc
struct a {
operator auto();
};
struct b : a {
using a::operator auto;
};
int main(){b v;int x = v;}
===
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107981] 'operator auto' has not been declared in base
2022-12-05 20:57 [Bug c++/107981] New: 'operator auto' has not been declared in base egor.pugin at gmail dot com
2022-12-05 21:02 ` [Bug c++/107981] " egor.pugin at gmail dot com
@ 2022-12-05 21:04 ` egor.pugin at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: egor.pugin at gmail dot com @ 2022-12-05 21:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107981
--- Comment #2 from Egor Pugin <egor.pugin at gmail dot com> ---
Ignore previous comment.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-05 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05 20:57 [Bug c++/107981] New: 'operator auto' has not been declared in base egor.pugin at gmail dot com
2022-12-05 21:02 ` [Bug c++/107981] " egor.pugin at gmail dot com
2022-12-05 21:04 ` egor.pugin at gmail dot com
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).