nosnap
驱动小牛
驱动小牛
  • 注册日期2003-10-27
  • 最后登录2014-03-20
  • 粉丝0
  • 关注0
  • 积分152分
  • 威望47点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
阅读:1890回复:0

VC6.0移植到VC2008中编译时遇到的问题

楼主#
更多 发布于:2012-12-31 22:19
程序以前在VC6.0中可以编译通过,在VC2008中编译时遇到以下问题,
该怎么修改?

:55  template <typename _Component, const GUID* _guid>
:56  class CComposite:
:57      public IQueryGuid
:58  {
:59      typedef CComposite<_Component, _guid> _thisClass;
:60      typedef std::list<_Component* > Children;
:61  
:62      class CompIterator:
:63          public Iterator<Children>
:64      {
    public:
        friend class CComposite<_Component, _guid>;
        explicit CompIterator(Children& acoll): foundation::Iterator<Children>(acoll) {}
    };


public:

    typedef foundation::IteratorBase<_Component*> Iterator;
.....

(63) : error C2923: 'stingray::foundation::Iterator' : 'std::list<_Component*>::iterator' is not a valid template type argument for parameter '_Iter'

(63) : warning C4346: 'std::list<_Component*>::value_type' : dependent name is not a type

(64) : error C2955: 'stingray::foundation::Iterator' : use of class template requires template argument list
....

游客

返回顶部