------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-31 02:35 -------
Subject: Re:   New: 'invalid use of member' error on correct code with
templates


On Dec 30, 2005, at 9:31 PM, yuri at tsoft dot com wrote:

> template<class A>
> struct S {
>   static inline void exec1(A &vv) {
>     vv.s1<1>(1);
>   }
> };
>

You are missing a template keyword.


You want:
     vv.template s1<1>(1);


Otherwise you end up with (vv.s1 < 1) > 1 as there is no way for a 
compiler
to know that vv.s1 is a template as vv is dependent.

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25610


Reply via email to