Ticket #8009: boost-program-options-hyphen-bug.patch

File boost-program-options-hyphen-bug.patch, 522 bytes (added by Markus Roth <markus.roth@…>, 10 years ago)

Patch.

  • boost/program_options/errors.hpp

     
    2525
    2626    inline std::string strip_prefixes(const std::string& text)
    2727    {
    28         return text.substr(text.find_last_of("-/") + 1);
     28        // "--foo-bar" -> "foo-bar"
     29        return text.substr(text.find_first_not_of("-/"));
    2930    }
    3031
    3132    /** Base class for all errors in the library. */