https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100226
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Bug 89370 would really help simplify this diagnostic. The last three lines would be: .../src/NCPkgFilterPattern.cc:343:28: required from here /usr/include/c++/11/bits/stl_tree.h:770:8: error: static assertion failed: comparison object must be invocable as const 770 | | ^ /usr/include/c++/11/bits/stl_tree.h:770:8: note: ‘std::is_invocable_v<const paircmp&, const std::pair<std::string, std::string&, const std::pair<std::string, std::string&>’ evaluates to false Which is pretty clear, I think.