KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this structure of classes. class Interface { // ... }; class Foo : public Interface { // ... }; template <class T> class Container { // ... }; And I have this constructor of some other class Bar. Bar(const Container<Interface> & bar){ // ... } When I call the constructor this way I get a "no matching function" error. Container<Foo> container (); Bar * temp = new Bar(container); What is wrong? Are templates not polymorphic?
Tags (comma-separated)
Save Edits
Cancel