Commit 4ebd5cd8 authored by Robert Edmonds's avatar Robert Edmonds

compat: Conditionalize the include of <string>

It is only needed on older protobuf versions where absl::string_view is
not being used.
parent 9c56038f
......@@ -28,8 +28,6 @@
#ifndef PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
#define PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
#include <string>
#if GOOGLE_PROTOBUF_VERSION >= 4022000
# define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
......@@ -39,6 +37,8 @@
#if GOOGLE_PROTOBUF_VERSION >= 6030000
# include <absl/strings/string_view.h>
#else
# include <string>
#endif
namespace protobuf_c {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment