| Summary: | Parser cannot deduce conversion from std::streampos to std::streamoff under Linux | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Nathan Ridge <zeratul976> |
| Component: | cdt-indexer | Assignee: | Project Inbox <cdt-indexer-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Tested again with Indigo release version, problem has gone away. Thanks for the update. |
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.