PDA

View Full Version : QMap::const_iterator has no < comparison operator



rogerjames99
6th December 2016, 13:06
Hi,

Help!

What am I missing here?

I am trying to iterate a QMap using a const_iterator.

Here is some test code.

Ignore this post p;ost. Stupid mistake!!"!!

Code should be != rather than < Doh!



roger@dragon:~$ cat test.cpp
#include <QMap>

main()
{
typedef int* eit_ptr_t;
typedef QMap<int, eit_ptr_t>
eit_sections_cache_t;

eit_sections_cache_t sections;


eit_sections_cache_t::const_iterator i = sections.constBegin();
for (; i < sections.constEnd(); ++i) {}
}