This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35497] New: Compiling error with template part. spec. involving function call and >>
- From: "rodolfo at rodsoft dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2008 14:48:27 -0000
- Subject: [Bug c++/35497] New: Compiling error with template part. spec. involving function call and >>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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