public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8857: template template arguments in conversion functions rejected
@ 2002-12-07 3:36 Martin von Loewis
0 siblings, 0 replies; 3+ messages in thread
From: Martin von Loewis @ 2002-12-07 3:36 UTC (permalink / raw)
To: gcc-gnats
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
>Number: 8857
>Category: c++
>Synopsis: template template arguments in conversion functions rejected
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sat Dec 07 03:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Martin v. Löwis
>Release: 3.1
>Organization:
>Environment:
System: SunOS paros 5.9 Generic_112233-02 sun4u sparc SUNW,Sun-Blade-1000
Architecture: sun4
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../configure --host=sparc-sun-solaris2.8 --enable-shared --enable-threads --with-cpu=v8 --with-gnu-ld --with-gnu-as --enable-version-specific-runtime-libs
>Description:
The following program is rejected:
template <class T> struct A {
template <class U> operator U() { return sizeof(U); }
};
template <class T> struct B {
template <template<class U>class X> operator X<double>() { return X<double>(); }
};
int main() {
A<double> a;
B<long> b;
a = b;
}
>How-To-Repeat:
When compiling this program, the compiler reports
b.cc:7: parse error before `<' token
b.cc:7: syntax error before `<' token
b.cc: In function `int main()':
b.cc:13: no match for `A<double>& = B<long int>&' operator
b.cc:1: candidates are: A<double>& A<double>::operator=(const A<double>&)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/8857: template template arguments in conversion functions rejected
@ 2003-01-13 0:11 reichelt
0 siblings, 0 replies; 3+ messages in thread
From: reichelt @ 2003-01-13 0:11 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, loewis, nobody
Synopsis: template template arguments in conversion functions rejected
State-Changed-From-To: analyzed->closed
State-Changed-By: reichelt
State-Changed-When: Sun Jan 12 16:11:47 2003
State-Changed-Why:
The bug is fixed in gcc 3.4-20021230 with the new parser.
(Testcase in preparation.)
BTW, the PRs 8572, 8578, 8702 have been fixed already.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8857
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/8857: template template arguments in conversion functions rejected
@ 2002-12-09 10:01 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-12-09 10:01 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, loewis, nobody
Synopsis: template template arguments in conversion functions rejected
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Dec 9 10:01:26 2002
State-Changed-Why:
Confirmed. Goes into the same category as PRs 383, 8572,
8578, 8702.
gcc2.95 even ICEd, but present 3.3 doesn't accept the code
either.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8857
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-13 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-07 3:36 c++/8857: template template arguments in conversion functions rejected Martin von Loewis
2002-12-09 10:01 bangerth
2003-01-13 0:11 reichelt
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).