|
Boost Users : |
Subject: [Boost-users] serialize a template class working with MSVC2005 but not gcc
From: professor rumsdiegeige (professor_rumsdiegeige_at_[hidden])
Date: 2008-10-17 02:33:33
Hello, I've got the following class definition:
template< class T > class ProxyClass
{
boost::ptr_vector<T> &e_;
ProxyClass( boost::ptr_vector<T> &f )
: e_(f)
{;};
template<class Archive> void save(Archive & ar, const unsigned int version) const
{
size_t o=0;
boost::ptr_vector< T >::iterator it = e_.begin();
/*for ( ; it != e_.end(); ++it, ++o )
{
const T &t = *( it );
ar & t;
}*/
}
};
Where
it says "boost::ptr_vector< T >::iterator it", the gcc compiler
on Linux complains "error: expected ';' before 'it'", while Visual
Studio 2005 compiles it fine without any errors.
What can I do here?
Thanks in advance for your help!
S. Lorentz
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net