We're using a toolchain with a C++ <set> implementation that warns if the set uses a comparator without a const call operator:
In file included from ... /protobuf/src/google/protobuf/compiler/java/java_file.cc:41:
In file included from ... /stl/gcc3/set:12:
In file included from ... /include/c++/v1/set:389:
... include/c++/v1/__tree:1817:22: error: the specified comparator type does not provide a const call operator [-Werror,-Wuser-defined-warnings]
... include/c++/v1/set:400:28: note: in instantiation of member function 'std::__2::__tree<const google::protobuf::FieldDescriptor *, google::protobuf::compiler::java::(anonymous namespace)::FieldDescriptorCompare, std::__2::allocator<const google::protobuf::FieldDescriptor *> >::~__tree' requested here
class _LIBCPP_TEMPLATE_VIS set
Likely toolchain change:
This seems like a reasonable warning since a mutable comparator seems like the kind of thing that would defy expectations.
Any objections to patching src/google/protobuf/compiler/java/java_file.cc with a const operator ()?