After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580507 - Glib::ustring::const_iterator has not the same interface as std::string::const_iterator
Glib::ustring::const_iterator has not the same interface as std::string::cons...
Status: RESOLVED DUPLICATE of bug 580773
Product: gtkmm
Classification: Bindings
Component: TreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-04-27 21:15 UTC by François Legendre
Modified: 2009-04-29 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description François Legendre 2009-04-27 21:15:47 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
Comment 1 Jonathon Jongsma 2009-04-27 22:00:23 UTC
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
Comment 2 Jonathon Jongsma 2009-04-29 21:01:12 UTC
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 ***