1234567891011121314151617
template<class T> class AbstractFactory { public: virtual ~AbstractFactory() {} virtual T* Create(uint32 type) const = 0; virtual bool CanCreate() const = 0; }; class DefaultFactory : public AbstractFactory<Widget*> { public: DefaultFactory(); Widget* Create(uint32 type) const; bool CanCreate(uint32 type) const; };
error C2555: 'gui::DefaultFactory::Create': overriding virtual function return type differs and is not covariant from 'gui::AbstractFactory<T>::Create'
class DefaultFactory : public AbstractFactory<Widget>