GNOME Bugzilla – Bug 580507
Glib::ustring::const_iterator has not the same interface as std::string::const_iterator
Last modified: 2009-04-29 21:01:12 UTC
#include <iostream> #include <glibmm.h> int main() { std::string str("Hello") ; for ( std::string::const_iterator it = str.begin() ; it != str.end() ; ++ it ) ; Glib::ustring ustr("Hello") ; for ( Glib::ustring::const_iterator it = ustr.begin() ; it != ustr.end() ; ++ it ) ; return 0 ; } When compiling, I get the following test.cpp:18: erreur: no match for ‘operator!=’ in ‘it != Glib::ustring::end()()’ Chris Vine suggests to switch from the single templated template <class T> bool operator!=(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs) to the twin templated template <class T1, class T2> bool operator!=(const ustring_Iterator<T1>& lhs, const ustring_Iterator<T2>& rhs) to solve this problem. But I am not enough expert to recommend this patch. Regards, François
Thanks for filing the bug. just adding a link to the original email thread for reference: http://mail.gnome.org/archives/gtkmm-list/2009-April/msg00093.html
chris vine's new bug is technically the duplicate, but I'll close this one and keep his since he has attached a patch. *** This bug has been marked as a duplicate of 580773 ***