fix(example): c++14 limitation (#19292)
fix the bug:
```shell
‘std::string_view’ is only available from C++17 onwards
```
The error occurs because the code is being compiled using the C++14 standard, which does not include the std::string_view type introduced in C++17. The Abseil library (absl), used by Protocol Buffers, includes absl/strings/string_view.h, which uses std::string_view. This causes the compilation to fail in environments configured with C++14 or earlier.
In the provided build system, the file add_person.cc is being compiled using the -std=c++14 flag, which is incompatible with code depending on features from C++17 (e.g., std::string_view).
Closes #19292
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/19292 from Kaikaikaifang:patch-1 ee276ffd0b
PiperOrigin-RevId: 698223950
pull/19295/head
parent
d3e9897b03
commit
3ba0709048
1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue