Index: boost/program_options/errors.hpp =================================================================== --- boost/program_options/errors.hpp (revision 82783) +++ boost/program_options/errors.hpp (working copy) @@ -25,7 +25,8 @@ inline std::string strip_prefixes(const std::string& text) { - return text.substr(text.find_last_of("-/") + 1); + // "--foo-bar" -> "foo-bar" + return text.substr(text.find_first_not_of("-/")); } /** Base class for all errors in the library. */