Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-1048

rotate() description's example seems misleading or wrong

    XMLWordPrintableJSON

Details

    • Usability

    Description

      rotate() description's example seems misleading at best. It says:

      Say that we have the sequence:

      2 4 6 8 1 3 5

      If we call rotate() with mid pointing to 5, the two segments are

      2 4 6 8 and 1 3 5

      To get the specified result, the mid must point to the fifth element, counting up from 1. But it would be more accurate to say "with mid pointing to advance(start, 4) ..." Further, the typeface for "5" makes it look like the item value 5, the last position on the original sequence list.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jimmbelll Jim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: