[haiku-3rdparty-dev] Error porting old STL code

  • From: Andrew Hudson <hudsonco1@xxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Thu, 8 Nov 2012 11:55:12 -0500 (EST)

I'm working on porting some old Titan code and have run across a Standard 
Template Library issue
that has me stumped.


Using GCC4, the error is:
type 'std::list<T*, std::allocator<T*> >' is not derived from type 
'EMMediaItemContainer<T>'


My guess is that GCC4 is enforcing tighter requirements for typing but I am not 
familiar 
enough with STL syntax. Any help is appreciated. 


include file follows:


<Some include files...>


#include <list>


template<class T>
class EMMediaItemContainer
{
public:
        virtual ~EMMediaItemContainer() ;


        bool Add(T* item);
        T* Current();
        T* First();
        T* Last();
        T* First(EMMediaType p_eType();
        T* Last(EMMediaType p_eType);
        bool Find(T* item);
        T* Find(int32 p_vID);
        void Next();
        T* Remove(T* item);
        T* Remove(int32 p_vID);
        void Rewind();
        int64 Size();
        list<T*>* GetList()


        virtual bool LockContainer();
        virtual void UnLockContainer();


        virtual void OnItemAdd();
        virtual void OnItemRemove();


protected:
        EMMediaItemContainer(EMMediaType p_eType);


private:
        EMMediaType m_eType;
        list<T*>::const_iterator __m_opIterator; // this is the error line!
        list<T*>* __m_opMediaItemList;
        EMSemaphore* __m_opSemaphore;
};
        
#include "EMMediaItemContainer.cpp"




Other related posts:

  • » [haiku-3rdparty-dev] Error porting old STL code - Andrew Hudson