Re: A Newbie Question about template template template



 DEVELOP > c-Plus-Plus > Re: A Newbie Question about template template template

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1
Topic: DEVELOP > c-Plus-Plus
User: "tom_usenet"
Date: 24 Jul 2003 07:06:59 AM
Object: Re: A Newbie Question about template template template
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
.

 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER