VC7 does NOT support template-template parameters involving non-type parameters 
Author Message
 VC7 does NOT support template-template parameters involving non-type parameters

Quote:

> Perhaps there's a qualification on the template-template
> support stating that it only works with type parameters
> that I didn't read.  (Wouldn't it bother you to have to
> state that though?)

This is a known limitation of VC7.0.  It has been fixed in VC7.1, which is
currently in beta.

Cheerio!

--
Brandon Bray                                          Visual C++ Compiler
This posting is provided AS IS with no warranties, and confers no rights.



Mon, 16 May 2005 04:50:13 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters
Not that familiar w/ 7.1 yet.  Is 7.1 a patch/service pack for vs7?  Or
another standalone product?

--
Adam Clauss



Quote:

> > Perhaps there's a qualification on the template-template
> > support stating that it only works with type parameters
> > that I didn't read.  (Wouldn't it bother you to have to
> > state that though?)

> This is a known limitation of VC7.0.  It has been fixed in VC7.1, which is
> currently in beta.

> Cheerio!

> --
> Brandon Bray                                          Visual C++ Compiler
> This posting is provided AS IS with no warranties, and confers no rights.



Mon, 16 May 2005 08:24:10 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters

Quote:
> Not that familiar w/ 7.1 yet.  Is 7.1 a patch/service pack for vs7?  Or
> another standalone product?

7.1 == Visual Studio .NET 2003 (aka "Everett").  See
http://msdn.microsoft.com/vstudio/productinfo/vstudio03/default.asp.

-cd



Mon, 16 May 2005 09:03:37 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters
could someone tell me the use of template templates?
I looked at the code, but what is the added value of template templates? an
example?

Bruno.


Quote:
> Perhaps there's a qualification on the template-template
> support stating that it only works with type parameters
> that I didn't read.  (Wouldn't it bother you to have to
> state that though?)

> [quote]
> error C3201: the template parameter list for class
> template 'Count' does not match the template parameter
> list for template parameter 'TemplateTemplate'
> [/quote]
> but it does!

> [source]
> template<int First_Tag>
> struct Count
> {
> enum Tags
>     {
>     First = First_Tag,
>     Last
>     };
> };

> template<template<int> class TemplateTemplate>
> struct BPoS
> {
> enum {value = TemplateTemplate<5>::Last};

> };

> int main()
> {
> BPoS<Count> bpos;
> }
> [/source]



Mon, 16 May 2005 16:41:15 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters

Quote:
> could someone tell me the use of template templates?
> I looked at the code, but what is the added value of template templates?
an
> example?

> Bruno.

Bruno: Take a look at "Modern C++ Design" by Andrei Alexandrescu -- template
template parameters are havily used in meta-programming (or generic
programming) a style of C++ programming that was more or less pioneered bu
Andrei.

--
Jonathan Caves
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.



Tue, 17 May 2005 01:02:08 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters
So we get to pay more to get the bugs from VS.NET fixed? :(
--
Adam Clauss



Quote:


> > Not that familiar w/ 7.1 yet.  Is 7.1 a patch/service pack for vs7?  Or
> > another standalone product?

> 7.1 == Visual Studio .NET 2003 (aka "Everett").  See
> http://msdn.microsoft.com/vstudio/productinfo/vstudio03/default.asp.

> -cd



Tue, 17 May 2005 01:03:19 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters

Quote:
> So we get to pay more to get the bugs from VS.NET fixed? :(

The VS.NET 2003 release will be available for $29 - basically the cost of
the media.

There will also be a service pack for VS.NET 2002 to be released shortly
after VS.NET 2003.

As to whether the particular problem you encountered will be fixed in the
service pack, I cannot say.  I wouldn't bet on it though.

Given the very attractive upgrade price for VS.NET 2003, it's hard to
imagine a good reason not to upgrade.

-cd



Tue, 17 May 2005 02:41:15 GMT  
 VC7 does NOT support template-template parameters involving non-type parameters
Quote:
>-----Original Message-----
>could someone tell me the use of template templates?
>I looked at the code, but what is the added value of

template templates? an

Quote:
>example?

>Bruno.

If you are familiar with the STL, then allocators are a
good example of something that probably ought to be a
template-template parameter.  If they were TTPs, the
rebind template method would not be needed, as the
template class using the allocator could simply tell it
what types it will be allocating.  The STL will be left as-
is to preserve compatibility with existing code, but newer
template libraries (Boost, MTL, Blitz++, Loki, etc..) may
make use of the standard C++ template facilities.

Without TTPs you can only pass types and (external)
integral constants as template parameters.  With TTPs you
can pass a template as a parameter, and then something
else can decide what the parameters to that template are.  
Or even use that same template more than once with
different template parameters.  This is how the Loki
generators work ("Modern C++").



Sat, 21 May 2005 02:12:41 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. template template parameter that VC++ does NOT support

2. Bug in inheritance from template template parameters in VC7

3. VC 7.1 final beta: bug with template template parameters

4. template template parameter with default value (VS.NET 2003)

5. Possible bug with template template parameters in VC++ 7.0

6. Templates as a templates-parameters

7. Template class as template parameter

8. template template parameters

9. template with template parameter

10. Template Template Parameters

11. template template parameter and static var definition

12. Template parameter conflicts with typedef in template argument

 

 
Powered by phpBB® Forum Software