Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.2
-
None
-
all
Description
now
const T QMap::operator[](const Key&) const
Why not
const T& QMap::operator[](const Key&) const
every time copy constructor for T called just because QMap is const.
I read code.
>return T();
so may be throwing exception (QList - like) would be beter choise.
or something like
const T& QMap::globalInvalid()
{
static T invalid();
return invalid;
}
Attachments
Issue Links
- relates to
-
QTBUG-114824 'QMap::operator[](const Key &key) const' should return 'const' value
- Closed