[cfe-dev] Compile errors with MSVC 2005 (SVN revision 53516)
Cédric Venet
cedric.venet at laposte.net
Sat Jul 12 10:20:54 PDT 2008
>
>
> If you change
>
> alist_iterator(pointer EP) : NodeIter(NodeTy::getNode(EP)) {}
>
> to
>
> alist_iterator(ValueT *EP) : NodeIter(NodeTy::getNode(EP)) {}
>
> It will compile fine.
Yes, I just changed
typedef typename super::pointer pointer;
to
typedef ValueT* pointer;
and it work. Before it was referring to
bidirectional_iterator<ValueT, ptrdiff_t>::pointer
which is
std::iterator<std::bidirectional_iterator_tag, Ty,
PtrDiffTy>::pointer
which with the STL of VC++2005 is
template<class _Category,
class _Ty,
class _Diff = ptrdiff_t,
class _Pointer = _Ty *,
class _Reference = _Ty&>
struct iterator
: public _Iterator_base
{ // base type for all iterator classes
typedef _Category iterator_category;
typedef _Ty value_type;
typedef _Diff difference_type;
typedef _Diff distance_type; // retained
typedef _Pointer pointer;
typedef _Reference reference;
};
So it is just doing manually what the compiler should do.
I don't think this will break with any existing STL implementation, someone
should commit a patch at least as temporary fix.
--
Cédric
More information about the cfe-dev
mailing list