public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9032: Can't find template match
@ 2002-12-20 14:24 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-20 14:24 UTC (permalink / raw)
To: carlo, gcc-bugs, gcc-prs, nobody
Synopsis: Can't find template match
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Dec 20 14:24:08 2002
State-Changed-Why:
It should compile. Here's a slightly smaller testcase:
-------------------
struct A {
void g();
};
struct B : A {};
template<class T>
void f(T, void (T::*m)());
int main() {
f(B(), &B::g);
}
------------------------
tmp/g> /home/bangerth/bin/gcc-3.4-CVS/bin/c++ -c troep.cc
troep.cc: In function `int main()':
troep.cc:11: error: no matching function for call to `f(B, void (A::*)())'
The problem is that &B::g decays too quickly to &A::g.
I'm pretty sure this is a duplicate of some other report
which I've seen lately (I though I had even filed it myself,
but couldn't find it among mine...).
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9032
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/9032: Can't find template match
@ 2002-12-20 14:06 carlo
0 siblings, 0 replies; 2+ messages in thread
From: carlo @ 2002-12-20 14:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9032
>Category: c++
>Synopsis: Can't find template match
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Dec 20 14:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Carlo Wood
>Release: g++ 3.x
>Organization:
>Environment:
>Description:
Shouldn't the attached file compile?
Maybe not, but I am not sure :(.
~>g++ -c troep.cc
troep.cc: In function `int main()':
troep.cc:19: no matching function for call to `f(B&, void (A::*)(int) const)'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="troep.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="troep.cc"
c3RydWN0IEEgewogIHZvaWQgZyhpbnQpIGNvbnN0IHsgfQp9OwoKc3RydWN0IEIgOiBwdWJsaWMg
QSB7Cn07Cgp0ZW1wbGF0ZTxjbGFzcyBUPgogIHZvaWQKICBmKFQgY29uc3QmIGEsIHZvaWQgKFQ6
OiptKShpbnQpIGNvbnN0KQogIHsKICB9CgppbnQgbWFpbih2b2lkKQp7CiAgQiBiOwoKICBmKCpz
dGF0aWNfY2FzdDxBKj4oJmIpLCAmQjo6Zyk7CS8vIFdvcmtzLgogIGYoYiwgJkI6OmcpOwkJCQkv
LyBGYWlscy4KfQo=
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-20 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 14:24 c++/9032: Can't find template match bangerth
-- strict thread matches above, loose matches on Subject: below --
2002-12-20 14:06 carlo
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).