stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
Subject [jira] Created: (STDCXX-78) std::copy() doesn't detect overlapping ranges
Date Thu, 01 Dec 2005 00:39:30 GMT
std::copy() doesn't detect overlapping ranges

         Key: STDCXX-78
     Project: STDCXX
        Type: Improvement
  Components: 25. Algorithms  
    Versions: 4.1.2    
 Environment: all
    Reporter: Martin Sebor
    Priority: Minor

Quoting from the response to the following post:

-------- Original Message --------
Subject: Re: questions about the lib.alg.copy test
Date: Wed, 30 Nov 2005 17:33:10 -0700
From: Martin Sebor <>
References: <>

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


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message