Re: Reprise: Template syntax help

From: Ali Cehreli (acehreli_at_yahoo.com)
Date: 08/10/04


Date: Tue, 10 Aug 2004 12:48:19 -0700

On Tue, 10 Aug 2004 12:21:11 -0700, Dave wrote:

> Please note that the answer is *not* to preface the offending line with
> "typename".

> struct foo_t
> {
> template <typename T>
> struct bar_t
> {
> T m_var;
> };
> };
>
> template <typename T>
> struct geeker
> {
> void func()
> {
> T::bar_t<int> local; // Error here!

This works:

      typename T:: template bar_t<int> local;

Ali