incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: [jira] Issue Comment Edited: (STDCXX-689) [LWG #280] std::reverse_iterator missing template assignment operator
Date Thu, 28 Feb 2008 20:03:46 GMT
 

>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).
>

Mime
View raw message