Original Post
I've had some 'minor' problems using this.
I've tried to do a very simply function of getting the time now and shoving it into an std::string.
#include "stdafx.h"
#include <boost/date_time/posix_time/posix_time.hpp>
namespace utility
{
// Gets the current date
std::string getDate();
std::string getTime();
std::string getDateTime()
{
return boost::posix_time::to_simple_string(boost::posix_time::second_clock::universal_time()); // get the time now into a string
}
}
If I try it that way VC7.1 (VS.Net03) throw this error at me :
g:\Programming\SDKs\boost_1_30_0\boost\lexical_cast.hpp(147): error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const boost::token_iterator_generatorhowever if i #define BOOST_NO_STRINGSTREAM before i import the lib. thus disabling stringstream it compiles fine. (commenting out the header include also makes the problem go away) Anyone else had experiance of this problem or is it something i've done to cause it? The regesion testing shows VC7.1 as having no problems with the date_time stuff so its a tad confusing :o [edited by - _the_phantom_ on November 25, 2003 11:29:46 PM] [edited by - _the_phantom_ on November 25, 2003 11:30:48 PM]::value_type' (or there is no acceptable conversion) with [ TokenizerFunc=boost::char_delimiters_separator , Iterator=std::basic_string ,std::allocator >::const_iterator, Type=std::string ]