[date_time] I/O broken in CVS HEAD

I can't compile this simple application from CVS HEAD using g++ (3.3.6 and 4.1.1). Not sure if this is date_time, range, or string_algo at fault here or perhaps something else: #include <boost/date_time/posix_time/posix_time.hpp> #include <iostream> using namespace std; using namespace boost::posix_time; int main () { ptime now = microsec_clock::local_time(); cout << now << endl; } I get these errors: /home/cepstein/src/boost/boost/range/const_iterator.hpp: In instantiation of `boost::range_const_iterator<const char*>': /home/cepstein/src/boost/boost/algorithm/string/replace.hpp:654: instantiated from `void boost::algorithm::replace_all(SequenceT&, const Range1T&, const Range2T&) [with 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> >]' /home/cepstein/src/boost/boost/date_time/time_facet.hpp:255: instantiated from `OutItrT boost::date_time::time_facet<time_type, CharT, OutItrT>::put(OutItrT, std::ios_base&, typename boost::date_time::date_facet<typename time_type::date_type, CharT, OutItrT>::char_type, const time_type&) const [with time_type = boost::posix_time::ptime, CharT = char, OutItrT = std::ostreambuf_iterator<char, std::char_traits<char> >]' /home/cepstein/src/boost/boost/date_time/posix_time/posix_time_io.hpp:51: instantiated from `std::basic_ostream<_CharT, _Traits>& boost::posix_time::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::posix_time::ptime&) [with CharT = char, TraitsT = std::char_traits<char>]' boost-datetime.cpp:13: instantiated from here /home/cepstein/src/boost/boost/range/const_iterator.hpp:37: error: `const char* ' is not a class, struct, or union type /home/cepstein/src/boost/boost/algorithm/string/replace.hpp: In function `void boost::algorithm::replace_all(SequenceT&, const Range1T&, const Range2T&) [with 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> >]': /home/cepstein/src/boost/boost/date_time/time_facet.hpp:255: instantiated from `OutItrT boost::date_time::time_facet<time_type, CharT, OutItrT>::put(OutItrT, std::ios_base&, typename boost::date_time::date_facet<typename time_type::date_type, CharT, OutItrT>::char_type, const time_type&) const [with time_type = boost::posix_time::ptime, CharT = char, OutItrT = std::ostreambuf_iterator<char, std::char_traits<char> >]' /home/cepstein/src/boost/boost/date_time/posix_time/posix_time_io.hpp:51: instantiated from `std::basic_ostream<_CharT, _Traits>& boost::posix_time::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::posix_time::ptime&) [with CharT = char, TraitsT = std::char_traits<char>]' boost-datetime.cpp:13: instantiated from here /home/cepstein/src/boost/boost/algorithm/string/replace.hpp:654: error: no matching function for call to `first_finder(const char* const&)' /home/cepstein/src/boost/boost/algorithm/string/replace.hpp: In function `void boost::algorithm::replace_all(SequenceT&, const Range1T&, const Range2T&) [with SequenceT = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Range1T = const char*, Range2T = char[1]]': /home/cepstein/src/boost/boost/date_time/time_facet.hpp:266: instantiated from `OutItrT boost::date_time::time_facet<time_type, CharT, OutItrT>::put(OutItrT, std::ios_base&, typename boost::date_time::date_facet<typename time_type::date_type, CharT, OutItrT>::char_type, const time_type&) const [with time_type = boost::posix_time::ptime, CharT = char, OutItrT = std::ostreambuf_iterator<char, std::char_traits<char> >]' /home/cepstein/src/boost/boost/date_time/posix_time/posix_time_io.hpp:51: instantiated from `std::basic_ostream<_CharT, _Traits>& boost::posix_time::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::posix_time::ptime&) [with CharT = char, TraitsT = std::char_traits<char>]' boost-datetime.cpp:13: instantiated from here /home/cepstein/src/boost/boost/algorithm/string/replace.hpp:654: error: no matching function for call to `first_finder(const char* const&)' /home/cepstein/src/boost/boost/algorithm/string/erase.hpp: In function `void boost::algorithm::erase_all(SequenceT&, const RangeT&) [with SequenceT = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, RangeT = const char*]': /home/cepstein/src/boost/boost/date_time/time_facet.hpp:377: instantiated from `OutItrT boost::date_time::time_facet<time_type, CharT, OutItrT>::put(OutItrT, std::ios_base&, typename boost::date_time::date_facet<typename time_type::date_type, CharT, OutItrT>::char_type, const time_type&) const [with time_type = boost::posix_time::ptime, CharT = char, OutItrT = std::ostreambuf_iterator<char, std::char_traits<char> >]' /home/cepstein/src/boost/boost/date_time/posix_time/posix_time_io.hpp:51: instantiated from `std::basic_ostream<_CharT, _Traits>& boost::posix_time::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::posix_time::ptime&) [with CharT = char, TraitsT = std::char_traits<char>]' boost-datetime.cpp:13: instantiated from here /home/cepstein/src/boost/boost/algorithm/string/erase.hpp:593: error: no matching function for call to `first_finder(const char* const&)'
-- Caleb Epstein

string_algo has been broken since the range library update in may. The maintainer is aware of the problem but havent had time to fix it.
participants (2)
-
Caleb Epstein
-
Martin