?
Solved

newbie question about nested template...

Posted on 2003-02-24
5
Medium Priority
?
190 Views
Last Modified: 2013-11-20
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
Comment
Question by:zollen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
iRBIs earned 150 total points
ID: 8015226
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
 

Author Comment

by:zollen
ID: 8017477
Could you offer an solution that can achieve the same goal?

stephen
0
 
LVL 1

Expert Comment

by:iRBIs
ID: 8017873
Can you post the description of your goal (I mean sematics, because I cannot find any alternative syntax)
0
 

Author Comment

by:zollen
ID: 8018035
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

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question