When analyzing an unsigned and integer warning when declaring an iterator in a for loop, I read this :
If possible, use the exact type that you will be comparing (for example, use std::string::size_typewhen comparing with length std::string).
I have QList<T>one that I wanted to iterate by declaring an iterator using the method described above:
for(QList::size_type i = 0; i < uploads.size(); i++)
{
}
And this gave me a compiler error:
error: 'template<class T> class QList' used without template parameters
for(QList::size_type i = 0; i < uploads.size(); i++)
? Qt ? QList::size_type, QList::size() int, ; , , .