Solved

Template typedefs

Posted on 2001-07-08
2
287 Views
Last Modified: 2008-02-01
template<class T>
class A{};

template<class T>
typedef A<T> B<T>;


doesn't seem to work.

What is the correct syntax for saying

`for all class T, B<T> is an alternative name for A<T>'

?
0
Comment
Question by:glebspy
  • 2
2 Comments
 
LVL 7

Expert Comment

by:KangaRoo
ID: 6263739
There is none, it is not in the language.
0
 
LVL 7

Accepted Solution

by:
KangaRoo earned 50 total points
ID: 6263769
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now