This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [PATCH] Specialize string::replace


Philip Martin wrote:

>
>iterator is __normal_iterator<pointer, basic_string> and has a base()
>member function that returns a pointer. pointer is the basic_string's
>allocater's pointer type. Is this sufficient? (Even if it is not
>sufficient, it is probably necessary before casting.)
>
>Similarly, const_iterator is __normal_iterator<const_pointer, basic_string>
>and here the base() member function returns a const_pointer.
>
>Do you really have to cast _CharT* to get const _CharT*? Isn't that a
>standard conversion?
>

Thanks for your observations. Very probably you are right, indeed. I was 
really worried to do everything in the most correct way, and I admit 
that something still escapes me as far as the iterator hierarchy is 
concerned, in particulat input_iterators. Now let's look forward for 
other opinions, Nathan's one, in particular.

Thanks again,
Paolo.



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