[date_time] Compilation error with MSVC8

Hello, before I explain my problem I'd like to apologize in advance if the error is on my part. Also this might have double posted because I believe I made an error initially, sorry if that's the case. I have a program using the date_time library. It compiles with msvc7.1 and MinGW but not under msvc8. Very simple usage is enough to recreate the error: #include <boost/date_time/posix_time/posix_time.hpp> ... boost::posix_time::ptime tim = boost::posix_time::second_clock::local_time(); std::cout << tim; I've attached the error output to this mail, I realize it is long but I wasn't sure if any bits could be safely left out. Any help that can be offered on this issue would be very much appreciated. Kind regards, Eoin C:\Develop\Libraries\Boost\boost\boost/range/const_iterator.hpp(37) : error C2825: 'C': must be a class or namespace when followed by '::' C:\Develop\Libraries\Boost\boost\boost/algorithm/string/replace.hpp(656) : see reference to class template instantiation 'boost::range_const_iterator<C>' being compiled with [ C=const char * ] C:\Develop\Libraries\Boost\boost\boost/date_time/time_facet.hpp(257) : see reference to function template instantiation 'void boost::algorithm::replace_all<std::basic_string<_Elem,_Traits,_Ax>,const char*,std::basic_string<_Elem,_Traits,_Ax>>(SequenceT &,const Range1T &,const Range2T &)' being compiled with [ _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char>, SequenceT=std::basic_string<char,std::char_traits<char>,std::allocator<char>>, Range1T=const char *, Range2T=std::basic_string<char,std::char_traits<char>,std::allocator<char>> ] C:\Develop\Libraries\Boost\boost\boost/date_time/time_facet.hpp(239) : while compiling class template member function 'std::ostreambuf_iterator<_Elem,_Traits> boost::date_time::time_facet<time_type,CharT>::put(OutItrT,std::ios_base &,char,const time_type &) const' with [ _Elem=char, _Traits=std::char_traits<char>, time_type=boost::posix_time::ptime, CharT=char, OutItrT=std::ostreambuf_iterator<char,std::char_traits<char>> ] C:\Develop\Libraries\Boost\boost\boost/date_time/posix_time/posix_time_io.hpp(51) : see reference to class template instantiation 'boost::date_time::time_facet<time_type,CharT>' being compiled with [ time_type=boost::posix_time::ptime, CharT=char ] Hello_Con\src\ConsoleTimeClient.cpp(41) : see reference to function template instantiation 'std::basic_ostream<_Elem,_Traits> &boost::posix_time::operator <<<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const boost::posix_time::ptime &)' being compiled with [ _Elem=char, _Traits=std::char_traits<char> ] C:\Develop\Libraries\Boost\boost\boost/range/const_iterator.hpp(37) : error C2039: 'const_iterator' : is not a member of '`global namespace'' C:\Develop\Libraries\Boost\boost\boost/range/const_iterator.hpp(37) : error C2146: syntax error : missing ';' before identifier 'type' C:\Develop\Libraries\Boost\boost\boost/range/const_iterator.hpp(37) : error C2208: 'boost::type' : no members defined using this type C:\Develop\Libraries\Boost\boost\boost/range/const_iterator.hpp(37) : fatal error C1903: unable to recover from previous error(s); stopping compilation

date_time uses the string_algo library which is broken after a range library update in the CVS HEAD. Use the released version of boost, 1.33, or the 1.34 release candidate.

Martin wrote:
date_time uses the string_algo library which is broken after a range library update in the CVS HEAD. Use the released version of boost, 1.33, or the 1.34 release candidate.
Thank you very much, I had forgotten to mention that I was working off of a very recent CVS boost. I should have checked out the problem more thoroughly. Kind regards, Eoin.
participants (2)
-
Eoin
-
Martin