This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Suspected template parsing bug.
- To: pderbysh at usa dot net (Paul Derbyshire)
- Subject: Re: Suspected template parsing bug.
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Sat, 27 Feb 99 19:07:23 PST
- Cc: egcs at egcs dot cygnus dot com, egcs-bugs at egcs dot cygnus dot com
> The following declaration gets a "parse error before '<'" that appears to
> be spurious:
>
> static X &transform (const BinOp &op,
> X &x,
> typename math_traits<
> typename X::rebind<
> typename __ref_remover<
> typename BinOp::second_argument_type
> >::value_type
> >::other
> >::pass_type y) throw ();
You may well have found a bug, but without a complete program (where are
X, math_traits, rebind, etc defined?) no one will be able to debug the
problem. Please resend with a complete program (preprocessor output
from the file you're trying to compile is one possibility).
> As you can see, all the aggressive "typename"ing in the world to qualify
> what template args are types doesn't prevent the error message.
The typename keyword will probably not make a difference in this case,
since this is not a template definition.