public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >>
@ 2008-03-07 14:49 rodolfo at rodsoft dot org
2008-04-19 0:08 ` [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x fang at csl dot cornell dot edu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rodolfo at rodsoft dot org @ 2008-03-07 14:49 UTC (permalink / raw)
To: gcc-bugs
The following code gives a compiling error with gcc-4.3.0 with -std=c++0x:
template <class T> class A {};
template <class T> class B {};
template <class R, class X1> class A<B<R(X1)>> {};
main.cpp:3: error: a function call cannot appear in a constant-expression
While if we use > > (instead of >>) in the class specialization, it compiles
fine, as in:
template <class T> class A {};
template <class T> class B {};
template <class R, class X1> class A<B<R(X1)> > {};
--
Summary: Compiling error with template part. spec. involving
function call and >>
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rodolfo at rodsoft dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35497
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x
2008-03-07 14:49 [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >> rodolfo at rodsoft dot org
@ 2008-04-19 0:08 ` fang at csl dot cornell dot edu
2008-10-05 1:17 ` fang at csl dot cornell dot edu
2008-12-29 0:19 ` reichelt at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: fang at csl dot cornell dot edu @ 2008-04-19 0:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fang at csl dot cornell dot edu 2008-04-18 21:48 -------
<opinion>
While the upcoming standard does support '>>' to double-close template
arguments, I would still recommend to anyone to separate them for clarity and
compatibility with less forgiving compilers.
</opinion>
--
fang at csl dot cornell dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fang at csl dot cornell dot
| |edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35497
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x
2008-03-07 14:49 [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >> rodolfo at rodsoft dot org
2008-04-19 0:08 ` [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x fang at csl dot cornell dot edu
@ 2008-10-05 1:17 ` fang at csl dot cornell dot edu
2008-12-29 0:19 ` reichelt at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: fang at csl dot cornell dot edu @ 2008-10-05 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fang at csl dot cornell dot edu 2008-10-05 01:16 -------
dupe PR 36460 (fixed in 4.4)?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35497
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x
2008-03-07 14:49 [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >> rodolfo at rodsoft dot org
2008-04-19 0:08 ` [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x fang at csl dot cornell dot edu
2008-10-05 1:17 ` fang at csl dot cornell dot edu
@ 2008-12-29 0:19 ` reichelt at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-12-29 0:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2008-12-29 00:16 -------
Yes, it's indeed a duplicate.
The bug has been fixed for GCC 4.4.0.
*** This bug has been marked as a duplicate of 36460 ***
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35497
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-29 0:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-07 14:49 [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >> rodolfo at rodsoft dot org
2008-04-19 0:08 ` [Bug c++/35497] Compiling error with template part. spec. involving function call and >> in c++0x fang at csl dot cornell dot edu
2008-10-05 1:17 ` fang at csl dot cornell dot edu
2008-12-29 0:19 ` reichelt at gcc dot gnu dot 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).