|
-
February 22nd, 2003, 12:35 AM
#1
Virtual Template Function
Hello,
I was wondering if it's possible to have a virtual template function. That is have a class, that has as one of its member functions a templated function that is also pure virtual.
ie.
Class A {
template <class T>
virtual int foo ( T & param ) = 0;
}
// class B is dervied from class A
Class B : public class A {
template <class T>
int foo (T & param) {
// implement foo...
}
}
When I arrange my code like this I get all sorts of errors, indicating that this is not allowed. Is there something i'm doing wrong? I dont see what the problem would be....any help at all would be appreciated!
thanks
Lil' Hash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|