c++ - passing a derived class object to constructor of template class - Stack Overflow
The issue is that you can't convert a pointer-to-method from pointer-to-method-of-derived-type to pointer-to-method-of-base-type, because pointer-to-methods are contravariant with the object type.
Consider:
Base
#write #indeed #erasure #derived::dosomethingelse #instance))
https://stackoverflow.com/questions/12216381/passing-a-derived-class-object-to-constructor-of-template-class https://stackoverflow.com/questions/12216381/passing-a-derived-class-object-to-constructor-of-template-class
Видео c++ - passing a derived class object to constructor of template class - Stack Overflow канала ResponseXAI
Consider:
Base
#write #indeed #erasure #derived::dosomethingelse #instance))
https://stackoverflow.com/questions/12216381/passing-a-derived-class-object-to-constructor-of-template-class https://stackoverflow.com/questions/12216381/passing-a-derived-class-object-to-constructor-of-template-class
Видео c++ - passing a derived class object to constructor of template class - Stack Overflow канала ResponseXAI
Комментарии отсутствуют
Информация о видео
2 июля 2025 г. 19:44:42
00:00:30
Другие видео канала