M
mosfet
Hi,
I am trying to modify existing code to use smart pointers and I get some
issues with virtual methods :
class Folder : public Object
{
public:
friend class PimItemCollection;
friend class ContactCollection;
friend class TaskCollection;
friend class AppointmentCollection;
// Constructor/destructor
Folder(OutlookSession* pOutlookSession) = 0;
virtual ~Folder();
virtual RefPtr<PimItemCollection> get_Items();
protected:
....
};
class ContactFolder : public Folder
{
public:
// Constructor/destructor
ContactFolder(OutlookSession* pOutlookSession);
ContactFolder();
virtual ~ContactFolder();
virtual RefPtr<ContactCollection> get_Items();
};
1>c:\testpoom\System.WindowsMobile.PocketOutlook.h(640) : error C2555:
'System::WindowsMobile:ocketOutlook::ContactFolder::get_Items':
overriding virtual function return type differs and is not covariant
from 'System::WindowsMobile:ocketOutlook::Folder::get_Items'
I Don't understand the error because ContactCollection is inheriting
from PimItemCollection.
I am trying to modify existing code to use smart pointers and I get some
issues with virtual methods :
class Folder : public Object
{
public:
friend class PimItemCollection;
friend class ContactCollection;
friend class TaskCollection;
friend class AppointmentCollection;
// Constructor/destructor
Folder(OutlookSession* pOutlookSession) = 0;
virtual ~Folder();
virtual RefPtr<PimItemCollection> get_Items();
protected:
....
};
class ContactFolder : public Folder
{
public:
// Constructor/destructor
ContactFolder(OutlookSession* pOutlookSession);
ContactFolder();
virtual ~ContactFolder();
virtual RefPtr<ContactCollection> get_Items();
};
1>c:\testpoom\System.WindowsMobile.PocketOutlook.h(640) : error C2555:
'System::WindowsMobile:ocketOutlook::ContactFolder::get_Items':
overriding virtual function return type differs and is not covariant
from 'System::WindowsMobile:ocketOutlook::Folder::get_Items'
I Don't understand the error because ContactCollection is inheriting
from PimItemCollection.