Community
Participate
Working Groups
The following code, which compiles fine, gives an error at the indicated line: #include <string> using std::streampos; using std::streamoff; void g(streamoff); void f() { streampos p; g(p); // ERROR HERE } The error is "Invalid arguments Candidates are: void g(long long int)". It seems the parser cannot deduce the conversion from streampos to streamoff. Such a conversion is valid (streampos is a typedef for fpos<mbstate>, and fpos has an operator streamoff()). I think what is confusing the parser is that it cannot resolve mbstate, the template parameter to fpos. I only experience this problem on Linux, it works fine on Windows. My compiler is gcc 4.5, OS is Ubuntu 10.04.
Tested again with Indigo release version, problem has gone away.
Thanks for the update.