Tweak syntax of casting function to void

GCC 4.9 seems to be unable to handle (void) syntax with a function, but
it is OK with a static_cast to void.
pull/9090/head
Adam Cozzette 3 years ago
parent 99612d0885
commit 68c17dcde8
  1. 2
      src/google/protobuf/repeated_ptr_field.h

@ -1631,7 +1631,7 @@ class RepeatedPtrIterator {
: it_(other.it_) {
// Force a compiler error if the other type is not convertible to ours.
if (false) {
(void)[](OtherElement* from) -> Element* { return from; };
static_cast<void>([](OtherElement* from) -> Element* { return from; });
}
}

Loading…
Cancel
Save