kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

VS2003: Compile error with parse.cpp (error C2446: ':' : no conversion from 'std::istream' to 'std::ifstream') #97

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create project files for VS2003
   set TDIR=vc2003 & set CMGEN="Visual Studio 7 .NET 2003"
   "%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\bin\vcvars32.bat"
   set CMVARS=-DBUILD_SHARED_LIBS=OFF -DMSVC_SHARED_RT=OFF

   cd /d C:\Coding\yaml-cpp\trunk
   mkdir bin\%TDIR%
   cd bin\%TDIR%
   del /s /q * & rmdir /s /q .
   cmake %CMVARS% -G %CMGEN% ..\..

2. Build any configuration

What is the expected output? What do you see instead?
Expected is that parse.cpp gets compiled.
Instead the following error message is displayed:
C:\Coding\yaml-cpp\trunk\util\parse.cpp(45): error C2446: ':' : no conversion 
from 'std::istream' to 'std::ifstream'

What version of the product are you using? On what operating system?
trunk r443, Visual Studio 2003 SP1

Please provide any additional information below.

I assume that VS2003 is maybe a little bit outdated in terms of the standard 
library.
But maybe someone has an idea how to workaround this issue.
This is the only issue left for VS2003, the library works fine.

Original issue reported on code.google.com by matthias...@gmail.com on 2 Mar 2011 at 9:47

GoogleCodeExporter commented 8 years ago
Found several hints to better use references in function definitions for VS2003.
Re-arranged the code a little and this compiles fine with VS2003.

Original comment by matthias...@gmail.com on 3 Mar 2011 at 7:19

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, fixed (r460).

Original comment by jbe...@gmail.com on 3 Mar 2011 at 8:02