[libcxx-commits] [PATCH] D120135: [libc++] Overhaul std::quoted; fix its relationship to character traits.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 21 11:28:51 PST 2022


Quuxplusone marked 3 inline comments as done.
Quuxplusone added a comment.

> If you have multiple commits for this mess it would be nice to have multiple PRs.

Sadly I don't. Most of the changes end up being interrelated anyway (e.g. `operator<<` can be a hidden friend, but also we change its signature at the same time; `__quoted_output_proxy` moves, but also goes under an `#if` at the same time...). I could probably disentangle the original "move `__quoted_output_proxy` to `<iomanip>`" change into its own commit, but that might be about all.



================
Comment at: libcxx/include/__filesystem/path.h:971
     basic_string<_CharT, _Traits> __tmp;
-    __is >> __quoted(__tmp);
+    __is >> _VSTD::__quoted(__tmp);
     __p = __tmp;
----------------
philnik wrote:
> 
Here I'm naturally inclined to match line 963, but I could go either way.


================
Comment at: libcxx/include/iomanip:525
     __str.push_back(__delim);
-    for ( ; __first != __last; ++ __first )
+    for ( ; __first != __last; ++__first)
     {
----------------
philnik wrote:
> 
Yup, looks like `(;` is libc++ style. Will switch.


================
Comment at: libcxx/include/iomanip:579
+    _LIBCPP_HIDE_FROM_ABI
+    explicit __quoted_output_proxy(const _CharT *__f, const _CharT *__l, _CharT __d, _CharT __e)
+        : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
----------------
philnik wrote:
> 
Here I'll stick with Standardese style (which is also, generally speaking, libc++ style): `int *p`, `int& r`.


================
Comment at: libcxx/include/iomanip:596-597
 
+    _LIBCPP_HIDE_FROM_ABI
+    explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
+        : __string_(__s), __delim_(__d), __escape_(__e) {}
----------------
I've added `_LIBCPP_HIDE_FROM_ABI` to this ctor. That's correct, right? @ldionne


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120135/new/

https://reviews.llvm.org/D120135



More information about the libcxx-commits mailing list