I'm trying to convert a gregorian::date to a string, as shown in the
following code:
// Build: cl /EHsc /I \CVS\boost dt.cpp
#include <iostream>
#include
int main()
{
boost::gregorian::date today(2004, boost::gregorian::Mar, 14);
std::cout << today << std::endl;
return 0;
}
When I compile it with Visual C++ 7.1, using Boost from CVS head, I get the
following error:
\CVS\boost\boost\lexical_cast.hpp(150) : error C2679: binary '>>' : no
operator
found which takes a right-hand operand of type
'boost::date_time::date_formatter
::string_type' (or there is no acceptable
conversion)
with
[
date_type=boost::gregorian::date,
format_type=boost::date_time::simple_format,
charT=wchar_t
]
The same thing happens when using to_simple_string and
to_simple_string_type<char>, rather than operator<<. I actually want the
result as a basic_string, but all variations produce this same
error. What am I doing wrong?
Thanks,
Keith MacDonald