Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-07-23 09:50:15


Carl wrote:

> I get the following compilation error for this simple program under MSVC6:
>
> ************** test.cpp******************
> #include <iostream>
> #include "boost/date_time/gregorian/gregorian.hpp"
>
> int main()
> {
> using namespace std;
>
> cout << ispunct(',') << endl;
>
> return 0;
> }
>
> ************************************
>
> error:
> --------------------Configuration: names_test - Win32
> Debug--------------------
> Compiling...
> test.cpp
> c:\documents and settings\waldbcar.waldbcar\my documents\my
> projects\vc\test\names_test\test.cpp(8) : error C2668: 'ispunct' :
> ambiguous call to overloaded function
> Error executing cl.exe.
>
> test.obj - 1 error(s), 0 warning(s)
>
> been dumped into the global namespace by default. However, it seems like
> the date-time library must be doing something like:
>
> namespace std
> {
> using ::ispunct;
> }
>
> somewhere in its internals (or maybe just using something else that does?).

This isn't done directly in date-time. I'm guessing that it might have
something to do with 'tokenizer' library which date-time uses for parsing.
See boost/token_function.hpp for some ispunct magic that is likely at
the root of this issue.

HTH,

Jeff


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