Opened 10 years ago

Closed 10 years ago

#7086 closed Bugs (fixed)

Compilation broken with STLPort

Reported by: Andrey Semashev Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

Boost.ProgramOptions fails to compile on Linux with GCC 4.6 and STLPort 5.2.1 with the following error:

libs/program_options/src/options_description.cpp: In function ‘void boost::program_options::{anonymous}::format_paragraph(stlp_std::ostream&, stlp_std::string, unsigned int, unsigned int)’:
libs/program_options/src/options_description.cpp:472:70: error: no matching function for call to ‘distance(const value_type*&, const value_type* const&)’
libs/program_options/src/options_description.cpp:472:70: note: candidate is:
./boost/range/distance.hpp:27:5: note: template<class T> typename boost::range_difference::type boost::distance(const T&)
libs/program_options/src/options_description.cpp:492:84: error: no matching function for call to ‘distance(const value_type*&, const value_type*&)’
libs/program_options/src/options_description.cpp:492:84: note: candidate is:
./boost/range/distance.hpp:27:5: note: template<class T> typename boost::range_difference::type boost::distance(const T&)

The attached patch resolves the problem.

Attachments (1)

options_description.cpp.patch (1.6 KB ) - added by Andrey Semashev 10 years ago.
The patch agains the release branch.

Download all attachments as: .zip

Change History (2)

by Andrey Semashev, 10 years ago

The patch agains the release branch.

comment:1 by Vladimir Prus, 10 years ago

Resolution: fixed
Status: newclosed

(In [79280]) Qualify 'distance' with 'std'.

Fixes #7086.

Note: See TracTickets for help on using tickets.