This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD] powerpc64 ODR violation check
On 3/9/13, Alan Modra <amodra@gmail.com> wrote:
> On Fri, Mar 08, 2013 at 06:06:31PM -0800, Ian Lance Taylor wrote:
>> That is peculiar. Can you try this test program? If this works, how
>> is it different from the code you wrote?
>
> It works. Another level of hierarchy? The following fails
> /tmp/template.cc: In member function ‘int E<size>::z()’:
> /tmp/template.cc:20:27: error: expected primary-expression before ‘)’ token
Oh yeah. You need to use the template keyword to tell the parser that
the name is a template function.
> template<int size>
> class E : D<size>
> {
> int
> z()
> { return this->fn<size>(); }
> };
That needs to be
{ return this->template fn<size>(); }
Ian