[1.33] Program_options and Borland

The following patches get Boost.Program Options compiling with Borland C++ 5.6.4 (it's enough to fix the regex grep test program which was what I wanted). Is it OK to apply these? I can't see how they would cause problems with other compilers: in fact I'm not at all clear how "cmdline" was ever found without the qualifier on other compilers. I haven't looked at the runtime test failures with this compiler yet (has anyone?), Regards, John. RCS file: /cvsroot/boost/boost/boost/program_options/detail/parsers.hpp,v retrieving revision 1.7 diff -r1.7 parsers.hpp 31c31 < : cmdline(to_internal(args)) ---
: detail::cmdline(to_internal(args))
38c38 < : cmdline( ---
: detail::cmdline(
49c49 < cmdline::set_options_description(desc); ---
detail::cmdline::set_options_description(desc);
59c59 < cmdline::set_positional_options(desc); ---
detail::cmdline::set_positional_options(desc);
67c67 < cmdline::style(style); ---
detail::cmdline::style(style);
75c75 < cmdline::set_additional_parser(ext); ---
detail::cmdline::set_additional_parser(ext);
84c84 < result.options = cmdline::run(); ---
result.options = detail::cmdline::run();

John Maddock wrote:
The following patches get Boost.Program Options compiling with Borland C++ 5.6.4 (it's enough to fix the regex grep test program which was what I wanted). Is it OK to apply these?
Yes, please!
I can't see how they would cause problems with other compilers: in fact I'm not at all clear how "cmdline" was ever found without the qualifier on other compilers.
The 'basic_command_line_parser' class template is derived from detail::cmdline, and so, I believe the 'cmdline' name should be injected in the scope of 'basic_command_line_parser'. Since all uses are inside that class, unqualified 'cmdline' works fine.
I haven't looked at the runtime test failures with this compiler yet (has anyone?),
I'll try to reproduce with my version of borland later this week. But IIRC, previously tests uses to pass for me while failing on metacomm. Thanks, Volodya

Yes, please!
OK, done.
I can't see how they would cause problems with other compilers: in fact I'm not at all clear how "cmdline" was ever found without the qualifier on other compilers.
The 'basic_command_line_parser' class template is derived from detail::cmdline, and so, I believe the 'cmdline' name should be injected in the scope of 'basic_command_line_parser'. Since all uses are inside that class, unqualified 'cmdline' works fine.
Understood, I never realised that was what happened to base classes, so many corners in this language!
I haven't looked at the runtime test failures with this compiler yet (has anyone?),
I'll try to reproduce with my version of borland later this week. But IIRC, previously tests uses to pass for me while failing on metacomm.
I can reproduce them here, but haven't looked into them any more than that yet. John.
participants (2)
-
John Maddock
-
Vladimir Prus