Container::max_size() is a _non-static_ member function in the STL, so we can't call it as C::max_size(). Instead, use the newly-added, Qt-style camel-case maxSize(), which we will keep static constexpr. Pick-to: 6.8 Task-number: QTBUG-128450 Change-Id: I839df90a91cced85f000c7d2744ba547f629ed98 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>