https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80711
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-05-11 00:00:00 |2017-11-22 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Also useful would be to warn for members that don't access any state at all: struct indirect_cmp { bool operator()(const X* l, const X* r) { return *l < *r; } }; This comparison object should have a const-qualified member function to be usable with associative containers such as std::set (see PR 83102 for example).