[libc-commits] [libc] [libc] Change cpp::string_view into cpp::basic_string_view<CharT> (PR #203355)

Alex Strelnikov via libc-commits libc-commits at lists.llvm.org
Thu Jun 25 06:47:30 PDT 2026


================
@@ -70,6 +70,19 @@ cpp::enable_if_t<cpp::is_fixed_point_v<T>, cpp::string> describeValue(T Value) {
 cpp::string_view describeValue(const cpp::string &Value) { return Value; }
 cpp::string_view describeValue(cpp::string_view Value) { return Value; }
 
+cpp::string describeValue(cpp::wstring_view Value) {
+  cpp::string S;
+  S += '{';
+  for (const wchar_t *Iter = Value.begin(); Iter + 1 != Value.end(); ++Iter) {
+    S += cpp::to_string(*Iter);
+    S += ',';
+  }
----------------
strel-12 wrote:

One last commit - I added a quick TODO in `describeValue` and fixed a very silly infinite loop mistake in the empty case.

https://github.com/llvm/llvm-project/pull/203355


More information about the libc-commits mailing list