templates question
-
hi, i have a question about interfaces and templates: is it possible to have a function template inside a interface? see code:
__interface ITest { template void TestFunc(T& data, int size); // ... }
is there an alternate method? i get a compiler error on this code. i am just getting started with templates -
hi, i have a question about interfaces and templates: is it possible to have a function template inside a interface? see code:
__interface ITest { template void TestFunc(T& data, int size); // ... }
is there an alternate method? i get a compiler error on this code. i am just getting started with templatesoops, sorry the formatter messed up my template<> brakets. anyway i think i figured it out -- abstract classes are basically the same as interfaces, so use it: template class ITest { void TestFunc(T& data, int size); // ... };