Now that Envoy is using c++17, std::string_view is available.To avoid a huge change to replace all uses in the code, absl::string_view will become an alias for std::string_view if we #define ABSL_USES_STD_STRING
Use absl::string_view instead of std::string_view as some environments (e.g. Android) don't provide std::string_view. #82994 Draft copybara-service wants to merge 1 commit into master from exported_pr_706054893 +116 −128 Conversation 0 Commits 1 Checks 4 Files changed 36 Convers...
Migrate const std::string& to absl::string_view. Migrate coded output stream arguments from const std::string& to `a… … 0361a59 copybara-service bot force-pushed the test_702003990 branch from 101b43d to 0361a59 Compare December 7, 2024 07:58 copybara-service bot merged commit 0361...
Use absl::string_view instead of std::string_view as some environments (e.g. Android) don't provide std::string_view. copybara-service bot force-pushed the exported_pr_705994482 branch 2 times, most recently from 854c027 to 7638192 Compare December 14, 2024 00:27 copybara-service bot ch...
293 - void AddFatalFailure(std::string_view expression, const char* file, 293 + void AddFatalFailure(absl::string_view expression, const char* file, 294 294 uint32_t line, absl::Status status); 295 295 296 296 inline absl::Status GetStatus(absl::Status&& status) { return stat...
std::string ToString(std::string_view name, std::string ToString(absl::string_view name, const std::vector<const T*>& tensors) { std::ostringstream result; for (size_t i = 0; i < tensors.size(); ++i) { 2 changes: 1 addition & 1 deletion 2 tflite/kernels/shim/README.md ...
99 // absl::string_view sv = obj.ReturnAString(); 100 // 101 // // GOOD use of string_view: str outlives sv 102 // std::string str = obj.ReturnAString(); 103 // absl::string_view sv = str; 104 // 105 // Due to lifetime issues, a `string_view...
However, beware of binding a `string_view` to a 86 // temporary value: 87 // 88 // // BAD use of string_view: lifetime problem 89 // absl::string_view sv = obj.ReturnAString(); 90 // 91 // // GOOD use of string_view: str outlives sv 92 // std::s...
The C++17 std::string_view has a constexpr substr() : https://en.cppreference.com/w/cpp/string/basic_string_view/substr While the absl version of substr() can not be used in a constexpr abseil-cpp/absl/strings/string_view.h Line 385 in 0...
("foo"); std::string s2("bar"); std::string s3("baz"); absl::string_view p1(s1); absl::string_view p2(s2); absl::string_view p3(s3); typedef std::map<absl::string_view, int> TestMap; TestMap map; map.insert(std::make_pair(p1, 0)); map.insert(std::mak...