This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Suspected template parsing bug.
- To: egcs at egcs dot cygnus dot com, egcs-bugs at egcs dot cygnus dot com
- Subject: Re: Suspected template parsing bug.
- From: Bob Steagall <steagall at deltalogic dot com>
- Date: Sat, 27 Feb 1999 22:15:38 -0500
At 09:35 PM 2/27/99 -0500, you wrote:
>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 ();
>
>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.
If X::rebind is fashioned in the same vein as std::allocator<T>::rebind<U>,
then you must qualify it with the 'template' keyword.
... typename X::template rebind< ....
--Bob
====================================================================
Bob Steagall steagall@deltalogic.com
DeltaLogic, Inc. http://www.deltalogic.com
Voice (216) 321-8200 Fax (216) 321-6976