This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Fix libstdc++/54577


Hi,

On 05/14/2013 03:41 PM, Jonathan Wakely wrote:
I'd forgotten about the existence of __const_pointer_cast etc. in <ext/cast.h> ...
Me too ;) I resorted to it as a sort of temporary kludge.
I agree that in C++11 mode __normal_iterator::_M_const_cast should not rely on the existence of a get() member on the custom pointer, because that's not required to exist, and you can do it like this instead: using PT = pointer_traits<ToType>; auto to = PT::pointer_to(const_cast<PT::element_type&>(*from));
Indeed, I have something like this in my tree too.

Thanks!
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]