public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/61726] New: Ambiguous overload resolution with inherited op()s @ 2014-07-06 16:35 kaballo86 at hotmail dot com 2014-12-14 0:57 ` [Bug c++/61726] " ville.voutilainen at gmail dot com 2021-12-11 4:15 ` pinskia at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: kaballo86 at hotmail dot com @ 2014-07-06 16:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61726 Bug ID: 61726 Summary: Ambiguous overload resolution with inherited op()s Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kaballo86 at hotmail dot com The following snippet results in an ambiguous overload error: struct foo1 { void operator()(int&) const {}; }; struct foo2 { void operator()(int const&) const {}; }; struct bar : foo1, foo2 {}; int main() { int i = 0; bar{}(i); // error int const ci = 0; bar{}(ci); // error } ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/61726] Ambiguous overload resolution with inherited op()s 2014-07-06 16:35 [Bug c++/61726] New: Ambiguous overload resolution with inherited op()s kaballo86 at hotmail dot com @ 2014-12-14 0:57 ` ville.voutilainen at gmail dot com 2021-12-11 4:15 ` pinskia at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: ville.voutilainen at gmail dot com @ 2014-12-14 0:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61726 Ville Voutilainen <ville.voutilainen at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed| |2014-12-14 CC| |ville.voutilainen at gmail dot com Ever confirmed|0 |1 Known to fail| |4.8.2, 4.9.1, 5.0 --- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- Clang accepts the code. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/61726] Ambiguous overload resolution with inherited op()s 2014-07-06 16:35 [Bug c++/61726] New: Ambiguous overload resolution with inherited op()s kaballo86 at hotmail dot com 2014-12-14 0:57 ` [Bug c++/61726] " ville.voutilainen at gmail dot com @ 2021-12-11 4:15 ` pinskia at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-12-11 4:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61726 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12944 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ICC and GCC rejects this code while clang and MSVC accept it. If we change it to a normal function rather than an operator, then all 4 compilers reject it as ambiguous. Are operators handled differently here for namelookup? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12944 [Bug 12944] [meta-bug] C++ name-lookup problems ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-11 4:15 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-07-06 16:35 [Bug c++/61726] New: Ambiguous overload resolution with inherited op()s kaballo86 at hotmail dot com 2014-12-14 0:57 ` [Bug c++/61726] " ville.voutilainen at gmail dot com 2021-12-11 4:15 ` pinskia 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).