Opened 9 years ago

#9566 new Bugs

program_options parsers.cpp does not compile: template-related error

Reported by: rv1971 <rv1971@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.55.0 Severity: Problem
Keywords: program_options parser compile template Cc:

Description

When compiling program_options/src/parsers.cpp for sun/release/stdlib-sun-stlport/threading-multi Sun Studio 11 C++ 5.8, the compiler issues the following errors:

"libs/program_options/src/parsers.cpp", line 162: Error: Could not find a match for boost::program_options::parse_config_file<boost::program_options::charT>(const char*, const boost::program_options::options_description&, bool). "libs/program_options/src/parsers.cpp", line 169: Error: Could not find a match for boost::program_options::parse_config_file<boost::program_options::charT>(const char*, const boost::program_options::options_description&, bool).

The attached patch solves the problem by expliciting the template parameter for parse_config_file. I guess this is a bug in the compiler rather than in boost, but it seems to me that the suggested patch is still correct C++. Since this is the only issue that would inhibit use of program_options on my platform, for me it would be very useful to integrate the patch into the library.

Attachments (1)

patch.txt (1.2 KB ) - added by rv1971 <rv1971@…> 9 years ago.
Patch for parsers.cpp

Download all attachments as: .zip

Change History (1)

by rv1971 <rv1971@…>, 9 years ago

Attachment: patch.txt added

Patch for parsers.cpp

Note: See TracTickets for help on using tickets.