template<class Item> class Object{}; template<class Item> class Parent { public: virtual void operator=(const Object<Item> iterator); virtual void foo(const Object<Item> iterator); }; template<class Item> class Child : public Parent<Item>{}; int main(int argc, char** argv) { Object<int> object; Child<int> child; child.foo(object); child.operator=(object); child = object; }
erreur: no matching function for call to ‘Child<int>::operator=(Object<int>&)’ note: candidats sont: Child<int>& Child<int>::operator=(const Child<int>&)