[v3] Fix libstdc++/54577

Paolo Carlini paolo.carlini@oracle.com
Tue May 14 12:40:00 GMT 2013


On 05/10/2013 04:17 PM, Paolo Carlini wrote:
> this is the issue about the signatures of the erase member functions 
> of the sequence containers. Mostly rather straightfoward stuff within 
> the limits of the current infrastructure: the various _M_const_case 
> are normally simple enough, I only mention the rather ugly std::vector 
> one, required otherwise an ext_pointer testcase fails: I suppose that 
> handling these issues in a proper way will happen together with 
> changing the vector::pointer typedef to the conforming:
>
>     typedef typename _Alloc_traits::pointer  pointer;
Oops, the PR that Jonathan just filed made me notice that in fact 
std::vector must be correct, because _Base::pointer actually means using 
_Alloc_traits.

Then I suppose that the correct way to move forward to C++11 the 
ext/pointer.h stuff would be adding a pointer_traits specialization for 
those pointer-like types, which would also wrap the cast operations in 
pointer_to. Then, in __normal_iterator::_M_const_cast use pointer_traits.

Paolo.



More information about the Libstdc++ mailing list