renaming class templates

A

Angel Tsankov

Does anyone know a way to rename a class template other than the inheritance trick:

template< typename t >
class orig
{
};

template< typename t >
class alias : public orig< t >
{
};
 
A

Alf P. Steinbach

* Angel Tsankov:
Does anyone know a way to rename a class template other than the
inheritance trick:

template< typename t >
class orig
{
};

template< typename t >
class alias : public orig< t >
{
};

Yes, you can wait for C++0x introducing template typedef's.

Or you can use a macro, which is dangerous.

Or if the purpose is just to avoid a name clash, you can import the name
in a namespace and use the qualified name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,802
Messages
2,569,661
Members
45,428
Latest member
ViolettePa

Latest Threads

Top