Solved

Template typedefs

Posted on 2001-07-08
2
286 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

708 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

15 Experts available now in Live!

Get 1:1 Help Now