(
https://github.com/google/protobuf/blob/a9ab38c17178fcedd9b46c09fa33f94d1a6335c3/src/google/protobuf/compiler/java/java_file.cc#L68
)

On Thursday, February 16, 2017 at 6:09:49 PM UTC-8, Ross Wang wrote:
>
> 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:
> https://reviews.llvm.org/rL291969
>
> 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 ()?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to