Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #8526 > unrolled thread

GCC: 'X is not a template type' error

Started byJeffrey Walton <noloader@gmail.com>
First post2011-08-06 18:41 -0700
Last post2011-08-08 17:38 +0900
Articles 3 — 3 participants

Back to article view | Back to comp.lang.c++


Contents

  GCC: 'X is not a template type' error Jeffrey Walton <noloader@gmail.com> - 2011-08-06 18:41 -0700
    Re: GCC: 'X is not a template type' error Qi <no@no.com> - 2011-08-07 10:15 +0800
      Re: GCC: 'X is not a template type' error Miles Bader <miles@gnu.org> - 2011-08-08 17:38 +0900

#8526 — GCC: 'X is not a template type' error

FromJeffrey Walton <noloader@gmail.com>
Date2011-08-06 18:41 -0700
SubjectGCC: 'X is not a template type' error
Message-ID<5a1c143f-fa1d-4731-9908-8cd28cfe88a2@d32g2000yqa.googlegroups.com>
Hi All,

I can't seem to get my syntax right. I've also tried the following,
and lots of unreadable combinations.

typedef typename C::value_type CIPHER;
typedef typename M::value_type MODE;

MODE < CIPHER > m_cipher;

Any help would be appreciated.

Jeff

  template <class C, class M>
  class BlockCipherGenerator : public KeyGenerator
  {
    ...

    private:
        M < C > m_cipher;
  };

[toc] | [next] | [standalone]


#8527

FromQi <no@no.com>
Date2011-08-07 10:15 +0800
Message-ID<j1kslt$eq8$1@speranza.aioe.org>
In reply to#8526
On 2011-8-7 9:41, Jeffrey Walton wrote:
>    template<class C, class M>
>    class BlockCipherGenerator : public KeyGenerator
>    {
>      ...
>
>      private:
>          M<  C>  m_cipher;
>    };


M should template template parameter.
So it should be

template <class C, template<class> class M>


-- 
WQ

[toc] | [prev] | [next] | [standalone]


#8560

FromMiles Bader <miles@gnu.org>
Date2011-08-08 17:38 +0900
Message-ID<buomxfke1r8.fsf@dhlpc061.dev.necel.com>
In reply to#8527
Qi <no@no.com> writes:
> M should template template parameter.
> So it should be
>
> template <class C, template<class> class M>

Whoa... you can do that...?!

-miles

-- 
Un-American, adj. Wicked, intolerable, heathenish.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web