Problem using std::prev on ustring iterator



Hello,

When I try to use std::prev on a ustring const_iterator nothing
happens, operator-- works fine.

Glib::ustring str = "test";
Glib::ustring::iterator iter = str.begin();

std::advance(iter);
printf("%c\n", *iter);

std::prev(iter);
printf("%c\n", *iter);

iter--;
printf("%c\n", *iter);

Output is
e
e
t

Any ideas why it doesn't work?

Thanks
Jeremy




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