[xsd-users] Visual Studio 2005: error C2039: 'iterator_category' : is not a member of...

Immich, Stefan simmich at soe.sony.com
Mon Sep 29 13:20:13 EDT 2008


We have recently tried to migrate our code base from Visual Studio 2003
to Visual Studio 2005. However we ran into problems using our through
xsd generated classes in conjunction with stl algorithms. Those
previously worked fine.

 

Example. For the following piece of code we get the error listed below:

 

std::transform(

 
m_configuration->AuthServers().get().Connection().begin(),

                m_configuration->AuthServers().get().Connection().end(),

                std::back_inserter( m_authServers ),

                EndpointAdapaterFactory()

            );

 

And the error message:

 

c:\program files\microsoft visual studio 8\vc\include\xutility(610) :
error C2039: 'iterator_category' : is not a member of
'xsd::cxx::tree::iterator_adapter<I>'

1>        with

1>        [

1>
I=std::_Vector_iterator<xsd::cxx::tree::sequence<lp2::station::config::c
onnections_t::_xsd_Connection::type_>::ptr,std::allocator<xsd::cxx::tree
::sequence<lp2::station::config::connections_t::_xsd_Connection::type_>:
:ptr>>

1>        ]

1>        c:\program files\microsoft visual studio
8\vc\include\algorithm(695) : see reference to class template
instantiation 'std::iterator_traits<_Iter>' being compiled

1>        with

1>        [

1>
_Iter=xsd::cxx::tree::iterator_adapter<std::_Vector_iterator<xsd::cxx::t
ree::sequence<lp2::station::config::connections_t::_xsd_Connection::type
_>::ptr,std::allocator<xsd::cxx::tree::sequence<lp2::station::config::co
nnections_t::_xsd_Connection::type_>::ptr>>>

1>        ]

1>        c:\blabla.cpp(69) : see reference to function template
instantiation 'std::back_insert_iterator<_Container>
std::transform<xsd::cxx::tree::iterator_adapter<I>,std::back_insert_iter
ator<_Container>,lp2::EndpointAdapaterFactory>(_InIt,_InIt,_OutIt,_Fn1)'
being compiled

1>        with

1>        [

1>            _Container=lp2::IStationConfiguration::Endpoints,

1>
I=std::_Vector_iterator<xsd::cxx::tree::sequence<lp2::station::config::c
onnections_t::_xsd_Connection::type_>::ptr,std::allocator<xsd::cxx::tree
::sequence<lp2::station::config::connections_t::_xsd_Connection::type_>:
:ptr>>,

1>
_InIt=xsd::cxx::tree::iterator_adapter<std::_Vector_iterator<xsd::cxx::t
ree::sequence<lp2::station::config::connections_t::_xsd_Connection::type
_>::ptr,std::allocator<xsd::cxx::tree::sequence<lp2::station::config::co
nnections_t::_xsd_Connection::type_>::ptr>>>,

1>
_OutIt=std::back_insert_iterator<lp2::IStationConfiguration::Endpoints>,

1>            _Fn1=lp2::EndpointAdapaterFactory

1>        ]

1>c:\program files\microsoft visual studio 8\vc\include\xutility(610) :
error C2146: syntax error : missing ';' before identifier
'iterator_category'

1>c:\program files\microsoft visual studio 8\vc\include\xutility(610) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int

 

 




More information about the xsd-users mailing list