From: Marek Kurdej Date: Mon, 7 Dec 2020 19:07:25 +0000 (+0100) Subject: [libc++] [docs] Mark LWG3055 as complete. Use string_view instead of string in path... X-Git-Tag: llvmorg-13-init~4147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf8683adfa39d53c223cf8b98fa036e835c9570e;p=platform%2Fupstream%2Fllvm.git [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. was added in commit 998a5c88312066fcc2b2de1358edc76587611354 (Implement ). Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D92731 --- diff --git a/libcxx/docs/Cxx2aStatusIssuesStatus.csv b/libcxx/docs/Cxx2aStatusIssuesStatus.csv index 4ef2400..2d0af44 100644 --- a/libcxx/docs/Cxx2aStatusIssuesStatus.csv +++ b/libcxx/docs/Cxx2aStatusIssuesStatus.csv @@ -143,7 +143,7 @@ "`3182 `__","Specification of ``Same``\ could be clearer","Kona","","" "","","","","" "`2899 `__","``is_(nothrow_)move_constructible``\ and ``tuple``\ , ``optional``\ and ``unique_ptr``\ ","Cologne","","" -"`3055 `__","``path::operator+=(*single-character*)``\ misspecified","Cologne","","" +"`3055 `__","``path::operator+=(*single-character*)``\ misspecified","Cologne","|Complete|","7.0" "`3158 `__","``tuple(allocator_arg_t, const Alloc&)``\ should be conditionally explicit","Cologne","","" "`3169 `__","``ranges``\ permutation generators discard useful information","Cologne","","" "`3183 `__","Normative permission to specialize Ranges variable templates","Cologne","","" diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem index d24751b..1a44d9f 100644 --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -940,9 +940,8 @@ public: template 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; }