This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Suspected template parsing bug.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]