https://bugs.kde.org/show_bug.cgi?id=365940
Bug ID: 365940 Summary: Warn when using non-owning smart pointers as associative container key Product: clazy Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: wishlist Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: vkra...@kde.org CC: smart...@kde.org Quoting -Wmarc: "The values of keys in an associated container are not supposed to change over time, thus they are marked as const in the std containers. But some types can change their values under the hood while being stored as const. Examples of such types as QPointer, weak_ptr, QWeakPointer, but also QPersistentModelIndex. As they change, the container's class invariants are broken (order in sorted and hash value unordered associative containers), and accessing such a container results in undefined behaviour." Reproducible: Always -- You are receiving this mail because: You are watching all bug changes.