You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/05/05 13:11:04 UTC

[GitHub] [incubator-brpc] pleiadesian commented on issue #1238: Make StringPiece match std::string_view

pleiadesian commented on issue #1238:
URL: https://github.com/apache/incubator-brpc/issues/1238#issuecomment-832674705


   It seems to be hard to make the StringPiece API exactly matches std::string_view. There are many methods in StringPiece that do not exist in std::string_view, such as `trim_spaces`, `front_or_0`, `wordmemcmp` and `CopyToString`. 
   There are two possible ways to solve this issue:
   1. Change these unmatching methods to functions and modify all the callers to use these functions. 
   2. Extend the std::string_view with the unmatching methods after c++17 is introduced by brpc.
   Any suggestions? @gydong 


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org