public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8930: bogus ambiguity taking the address of a member template, take 2
@ 2002-12-13 12:06 sebor
0 siblings, 0 replies; 2+ messages in thread
From: sebor @ 2002-12-13 12:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 8930
>Category: c++
>Synopsis: bogus ambiguity taking the address of a member template, take 2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 13 12:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: sebor@roguewave.com
>Release: 3.2
>Organization:
>Environment:
>Description:
This still fails with 3.2. The original report, PR 4361, was closed in March 02.
Thanks
Martin
$ cat t.cpp; gcc --version; gcc t.cpp -c; echo $?
template <class T>
class auto_ptr;
template <class T>
struct auto_ptr_ref
{
template <class U>
auto_ptr_ref (auto_ptr<U>&) throw () { }
};
template<class T>
struct auto_ptr
{
template <class U>
operator auto_ptr_ref<U>() throw () {
return auto_ptr_ref<U>(*this);
}
template <class U>
operator auto_ptr<U>() throw () {
return auto_ptr<U>();
}
};
struct B { };
struct D: B { };
int main ()
{
auto_ptr<B> (auto_ptr<D>::*pf)() = &auto_ptr<D>::operator auto_ptr<B>;
}
gcc (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
t.cpp: In function `int main()':
t.cpp:32: no matches converting function `operator auto_ptr_ref<U>' to type `
struct auto_ptr<B> (struct auto_ptr<D>::*)()'
t.cpp:16: candidates are: template<class U> auto_ptr::operator
auto_ptr_ref<U>() [with U = U, T = D]
1
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/8930: bogus ambiguity taking the address of a member template, take 2
@ 2002-12-13 12:47 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-13 12:47 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, sebor
Synopsis: bogus ambiguity taking the address of a member template, take 2
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Fri Dec 13 12:47:38 2002
State-Changed-Why:
As Nathan explained in 4361, this is fixed on mainline, and
since it is not a regression, it will not get fixed in 3.2.2.
I checked that it indeed works on mainline as of last week.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8930
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-13 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-13 12:06 c++/8930: bogus ambiguity taking the address of a member template, take 2 sebor
2002-12-13 12:47 bangerth
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).