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

std::copy() doesn't detect overlapping ranges

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
    • 4.3.0
    • 25. Algorithms
    • None
    • all

    • Usability

    Description

      Quoting from the response to the following post:
      http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200511.mbox/%3c4D6A8407B7AC6F4D95B0E55C4E7C4C6202EEFD7E@exmsk.moscow.vdiweb.com%3e

      -------- Original Message --------
      Subject: Re: questions about the lib.alg.copy test
      Date: Wed, 30 Nov 2005 17:33:10 -0700
      From: Martin Sebor <sebor@roguewave.com>
      To: stdcxx-dev@incubator.apache.org
      References: <4D6A8407B7AC6F4D95B0E55C4E7C4C6202EEFD7E@exmsk.moscow.vdiweb.com>

      Anton Pevtsov wrote:
      [...]
      >
      > 2. The copy algorithm can work in case when the destination range
      > overlaps the source range (of course, first position of the source range
      > should not be contained in the destination range). Current version
      > doesn't contain special test for this case, but I prefer to have such
      > test. What do you think about it?

      The requirement in 25.2.1, p3 is that "result shall not be in the
      range [first, last)." The algorithm doesn't detect violations of
      this requirement but it probably should in debug mode. This would
      be a useful enhancement in general. Let me file an enhancement for
      it.

      Martin

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified