template question

M

Marc Schellens

I have a template like:

template< typename B> class A: public B
{
typedef typename B::Ty Ty;
A( Ty&);

A( string);
};

The latter ctor, I need only for one out of several B
But for one B, B::Ty is a string.

So I get an error message.

Question:
Can I define a ctor for only one special A<B> ?
If not is there another solution?

thanks,
marc
 

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
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top