[libc++] [docs] Mark LWG3055 as complete. Use string_view instead of string in path::operator+=(ECharT).
The issue didn't change the behaviour which is tested in libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp.
The change to use string_view instead of string is not strictly necessary.
<filesystem> was added in commit 998a5c88312066fcc2b2de1358edc76587611354 (Implement <filesystem>).
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D92731
GitOrigin-RevId: bf8683adfa39d53c223cf8b98fa036e835c9570e
diff --git a/include/filesystem b/include/filesystem
index d24751b..1a44d9f 100644
--- a/include/filesystem
+++ b/include/filesystem
@@ -940,9 +940,8 @@
template <class _ECharT>
typename enable_if<__can_convert_char<_ECharT>::value, path&>::type
operator+=(_ECharT __x) {
- basic_string<_ECharT> __tmp;
- __tmp += __x;
- _PathCVT<_ECharT>::__append_source(__pn_, __tmp);
+ _PathCVT<_ECharT>::__append_source(__pn_,
+ basic_string_view<_ECharT>(&__x, 1));
return *this;
}