Re: Something wrong with ustring::const_iterator



On 27/04/09 04:30 AM, Krzesimir Nowak wrote:
That doesn't work, because your str is not const, so it executes this
method:
iterator Glib::ustring::end();
instead of:
const_iterator Glib::ustring::end() const;

No. The C++ lookup for the method would determine the method based on the return type first, and then check for const-ness, which is in that case fine as non-const -> const is allowed.



Hun


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]