Re: A Newbie Question about template template template

Discussion in 'C++' started by tom_usenet, Jul 24, 2003.

  1. tom_usenet

    tom_usenet Guest

    On 21 Jul 2003 22:18:28 -0700, (DarkSpy) wrote:

    >#include <vector>
    >using namespace std;
    >
    >template <template <typename T> class B1,
    > template <template<typename T> class B2> class B3> class CX
    >{};
    >main()
    >{
    > CX<vector, vector<vector> > c;
    >}
    >
    >g++ 3.3 error:
    >ttt.cpp:18: error: type/value mismatch at argument 1 in template
    >parameter list
    > for `template<class _Tp, class _Alloc> class std::vector'
    >ttt.cpp:18: error: expected a type, got `vector'
    >ttt.cpp:18: error: template argument 2 is invalid
    >ttt.cpp:18: error: ISO C++ forbids declaration of `type name' with no
    >type
    >ttt.cpp:18: error: type/value mismatch at argument 2 in template
    >parameter list
    > for `template<template<class T> class B1, template<template<class
    >T> class
    > B2> class B3> class CX'
    >ttt.cpp:18: error: expected a class template, got `int'
    >ttt.cpp:18: error: ISO C++ forbids declaration of `c' with no type
    >
    >can i make 2 arguments with template class ? is this code correct ?


    template template arguments exist, template template template
    arguments don't. Do you have a concrete use for them?

    Tom
     
    tom_usenet, Jul 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Theis
    Replies:
    2
    Views:
    475
    Chris Theis
    Jul 24, 2003
  2. Jerry C.
    Replies:
    8
    Views:
    244
    Uri Guttman
    Nov 23, 2003
  3. Kruno Saho
    Replies:
    0
    Views:
    143
    Kruno Saho
    Apr 7, 2013
  4. Dave Angel
    Replies:
    0
    Views:
    125
    Dave Angel
    Apr 7, 2013
  5. rusi
    Replies:
    0
    Views:
    112
Loading...

Share This Page