• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

newbie question about nested template...

Hi,

  I am using visual studio 6.0. It seems the compile cannot swallow the following syntax...

1. template <typename T, template<class> class G>
2. class ABC : public G<T>
3. {
4. public:
5. };


It complains that nested template in line #1 is not allowed. Does anyone know the solve this problem? (i.e. service pack, alternative syntax...etc)

thanks.
stephen


0
zollen
Asked:
zollen
  • 2
  • 2
1 Solution
 
iRBIsCommented:
I don't believe you can find service pack you need - even CL ver. 13 (which comes with VS.NET) cannot compile it. Try Intel compiler or CodeWarrior or maybe something else. I definitly know that Cygwin's GNU C++ can compile this.

P.S. Had you read a book by Andrew Alexandresku before writing this?
0
 
zollenAuthor Commented:
Could you offer an solution that can achieve the same goal?

stephen
0
 
iRBIsCommented:
Can you post the description of your goal (I mean sematics, because I cannot find any alternative syntax)
0
 
zollenAuthor Commented:
Is there a way to implement template of template without using nested template syntax?

Are you saying vc++6.0 simply does not support template of template?

How about other compilers (i.e. aCC, xlC, CC..etc)??
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now