You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Travis Vitek <Tr...@roguewave.com> on 2008/02/28 21:03:46 UTC

RE: [jira] Issue Comment Edited: (STDCXX-689) [LWG #280] std::reverse_iterator missing template assignment operator

 

>Travis Vitek wrote:
>
>vitek edited comment on STDCXX-689 at 2/26/08 6:58 PM:
>--------------------------------------------------------------
>
>It seems that changing this would introduce a source incompatibility.
>
>{noformat}
>  int a [10] = {0};
>
>  std::reverse_iterator<      int*>  rvi (&a [0]);
>  std::reverse_iterator<const int*> crvi (&a [0]);
>  
>  // this is std::operator== (const std::reverse_iterator<int*>&, 
>  //                          const std::reverse_iterator<const int*>&)
>   rvi == crvi; // also for !=, <, <=, >, >= and -
>  crvi == rvi;
>{noformat}
>
>The above code would compile with new versions of the library, 
>but not with older versions of the library. Is this change 
>suitable for 4.2.1? It seems that it should not be.
>
>As an aside, I'm with John Potter on wg issues 179 and 280... 
>??I think the issue is in support of bad code. Compares should 
>be between two iterators of the same type.??
>
>

Does anyone have some feedback on this issue. Even just a Yay or Nay for
fixing for 4.2.1 it would be nice.

Travis

>  
>> [LWG #280] std::reverse_iterator missing template assignment operator
>> ---------------------------------------------------------------------
>>
>>                 Key: STDCXX-689
>>                 URL: https://issues.apache.org/jira/browse/STDCXX-689
>>             Project: C++ Standard Library
>>          Issue Type: Bug
>>          Components: 24. Iterators
>>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>>            Reporter: Martin Sebor
>>            Priority: Trivial
>>             Fix For: 4.2.1
>>
>>   Original Estimate: 2h
>>  Remaining Estimate: 2h
>>
>> LWG Issue 280 added a template assignment operator to 
>reverse_iterator:
>> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280
>> It doesn't look like we ever added the function.
>> I'm having trouble coming up with a test case that would 
>reveal its absence so this is just a placeholder to remind us 
>to look into this in more detail to make sure the function 
>really is needed (if not, there's no need to complicate the 
>interface of the template).
>

Re: [jira] Issue Comment Edited: (STDCXX-689) [LWG #280] std::reverse_iterator missing template assignment operator

Posted by Farid Zaripov <Fa...@epam.com>.
From: Travis Vitek [mailto:Travis.Vitek@roguewave.com]
To: dev@stdcxx.apache.org
Subject: RE: [jira] Issue Comment Edited: (STDCXX-689) [LWG #280] std::reverse_iterator missing template assignment operator

> Does anyone have some feedback on this issue. Even just a Yay or Nay for
> fixing for 4.2.1 it would be nice.

  I agree that the fixing of this issue will break the forward source compatibility, and that this issue should be fixed in 4.3 release.

Farid.