[libcxx-commits] [PATCH] D120751: [libc++] Fix initialization of __fill_
Jake Egan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 3 06:28:58 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3e8771917729: [libc++] Fix initialization of __fill_ (authored by Jake-Egan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120751/new/
https://reviews.llvm.org/D120751
Files:
libcxx/include/ios
libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
===================================================================
--- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
+++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
@@ -20,7 +20,6 @@
int main(int, char**)
{
std::ios ios(0);
- assert(ios.fill() == ' ');
char c = ios.fill('*');
assert(c == ' ');
assert(ios.fill() == '*');
Index: libcxx/include/ios
===================================================================
--- libcxx/include/ios
+++ libcxx/include/ios
@@ -781,6 +781,8 @@
_CharT
basic_ios<_CharT, _Traits>::fill(char_type __ch)
{
+ if (traits_type::eq_int_type(traits_type::eof(), __fill_))
+ __fill_ = widen(' ');
char_type __r = __fill_;
__fill_ = __ch;
return __r;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120751.412697.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220303/652111ed/attachment.bin>
More information about the libcxx-commits
mailing list