diff --git a/src/google/protobuf/compiler/cpp/helpers.h b/src/google/protobuf/compiler/cpp/helpers.h index 7cfe12c26c81f..bd3c61869ebdc 100644 --- a/src/google/protobuf/compiler/cpp/helpers.h +++ b/src/google/protobuf/compiler/cpp/helpers.h @@ -776,7 +776,7 @@ template void ForEachField(const Descriptor* d, T&& func) { if (do_nested_types) { for (int i = 0; i < d->nested_type_count(); i++) { - ForEachField(d->nested_type(i), std::forward(func)); + ForEachField(d->nested_type(i), std::forward(func)); } } for (int i = 0; i < d->extension_count(); i++) { @@ -790,7 +790,7 @@ void ForEachField(const Descriptor* d, T&& func) { template void ForEachField(const FileDescriptor* d, T&& func) { for (int i = 0; i < d->message_type_count(); i++) { - ForEachField(d->message_type(i), std::forward(func)); + ForEachField(d->message_type(i), std::forward(func)); } for (int i = 0; i < d->extension_count(); i++) { func(d->extension(i));