Boost logo

Boost Users :

From: s_j_turner s_j_turner_at_[hidden])
Date: 2003-01-03 05:29:45


--- In Boost-Users_at_[hidden], "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 <boost/date_time/gregorian/gregorian.hpp>
> #include <boost/date_time/posix_time/posix_time.hpp>
>

  using namespace std; // <- to here

> using namespace boost::gregorian;
> using namespace boost::posix_time;
>
<snip>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net