program_options & VC6: internal compiler error?

Hi, I was trying to use the program_options library and used the following example. However, I got an internal compiler error. I reduced the example to this minimum. The library build fine, so I assume it's compatible with VC6. What went wrong? Code: #include "stdafx.h" #include <boost/program_options.hpp> #include <iostream> int main(int ac, char* av[]) { boost::program_options::variables_map vm; std::cout << vm["compression"].as<int>(); // line 8 return 0; } Output: Configuration: Program Options Test - Win32 Release Compiling... StdAfx.cpp Compiling... Program Options Test.cpp C:\VC\temp\Program Options Test\Program Options Test.cpp(8) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion) C:\VC\temp\Program Options Test\Program Options Test.cpp(8) : error C2062: type 'int' unexpected Error executing cl.exe. Program Options Test.exe - 2 error(s), 0 warning(s) Configuration: Program Options Test - Win32 Debug Compiling... Program Options Test.cpp C:\VC\temp\Program Options Test\Program Options Test.cpp(8) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Error executing cl.exe. Program Options Test.exe - 1 error(s), 0 warning(s) -- Olaf van der Spek http://xccu.sf.net/

Olaf van der Spek wrote:
I'm afraid it's not the case, the note at: http://www.meta-comm.com/engineering/boost-regression/developer/program_opti... says that one of the primary interfaces of program_options is not usable with that compiler.
Specifically here, vc6 does not allow to pass template parameter to a member template. I'm not aware of any workarounds, sorry. - Volodya

Vladimir Prus wrote:
http://www.meta-comm.com/engineering/boost-regression/developer/program_opti...
says that one of the primary interfaces of program_options is not usable with that compiler.
The exact URL is http://www.meta-comm.com/engineering/boost-regression/developer/output/metac... - Volodya
participants (2)
-
Olaf van der Spek
-
Vladimir Prus