Ticket #7086: options_description.cpp.patch

File options_description.cpp.patch, 1.6 KB (added by Andrey Semashev, 10 years ago)

The patch agains the release branch.

  • options_description.cpp

     
    147147            if (prefix_style == command_line_style::allow_long_disguise)
    148148                return "-" + m_long_name;
    149149        }
    150                 // sanity check: m_short_name[0] should be '-' or '/'
     150        // sanity check: m_short_name[0] should be '-' or '/'
    151151        if (m_short_name.length() == 2)
    152152        {
    153153            if (prefix_style == command_line_style::allow_slash_for_short)
     
    469469                    // Take care to never increment the iterator past
    470470                    // the end, since MSVC 8.0 (brokenly), assumes that
    471471                    // doing that, even if no access happens, is a bug.
    472                     unsigned remaining = distance(line_begin, par_end);
     472                    unsigned remaining = std::distance(line_begin, par_end);
    473473                    string::const_iterator line_end = line_begin +
    474474                        ((remaining < line_length) ? remaining : line_length);
    475475           
     
    489489                        {                 
    490490                            // is last_space within the second half ot the
    491491                            // current line
    492                             if (static_cast<unsigned>(distance(last_space, line_end)) <
     492                            if (static_cast<unsigned>(std::distance(last_space, line_end)) <
    493493                                (line_length / 2))
    494494                            {
    495495                                line_end = last_space;