mapleFU opened a new issue #1238: URL: https://github.com/apache/incubator-brpc/issues/1238
**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)** C++17 will include `std::string_view`, which is essentially just a standardized replacement for StringPiece. To plan ahead for this, we should consider updating the StringPiece API so that it exactly matches std::string_view. Then a few years from now when C++17 is widespread we can make StringPiece just a type alias for std::string_view. I believe StringPiece is just used within protobuf internals at the moment and so we can safely change its API without breaking any user code. **Describe the solution you'd like (描述你期望的解决方法)** Using a macro to using string_view ``` #ifdef XXX using base = basic_string_view ... #else // The original definitions.. #endif ``` The abseil and boost solve it in this way. **Describe alternatives you've considered (描述你想到的折衷方案)** Using constructor like `StringPiece(string_view)`... **Additional context/screenshots (更多上下文/截图)** None. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
