QMap insertMulti vs QMap<int, QSet<QString> >

446 Views Asked by At

I was looking at storing a set of values in a map, with an int as a key: -

QMap<int, QSet<QString> > setOfValues;

While reading the documentation, I noticed that QMap provides the insertMulti function, to allow inserting multiple values for the same key.

Ignoring QMultimap, since this is just a convenience wrapper around QMap::insertMulti, would there be any advantage of using the insertMulti function of QMap, rather than a map of a set, as above?

0

There are 0 best solutions below