--- In Boost-Users@yahoogroups.com, "Black Ice" wrote:
boost version 2002-01-02 VC 7.1 Final Beta "error C2668: 'abs' : ambiguous call to overloaded function" when compile following code. The same code can be built successfully in vc6. Any suggestion are appreciated.
I suggest ... that you tell us which line caused the error. Also, if you really need the using declaration for namespace std, try putting it after all the includes. Otherwise you're messing with the context of the included files.
#define DATE_TIME_INLINE #define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
#include <iostream> #include <string> using namespace std;
^^^^^^^^^^^^^^^^^^^ <- move this
#include
#include
using namespace std; // <- to here
using namespace boost::gregorian; using namespace boost::posix_time;
<snip>