[libc++] Fix initialization of __fill_
authorJake Egan <jakeegan10@gmail.com>
Thu, 3 Mar 2022 14:28:23 +0000 (09:28 -0500)
committerJake Egan <jakeegan10@gmail.com>
Thu, 3 Mar 2022 14:28:49 +0000 (09:28 -0500)
commit3e87719177296a80ebf3fbf801a6f75799d2fe5e
treecaf33adc1c276302ab4025a9aae482b157c044d5
parente9302bf7efc70a26cfa620ffaa614dc70cdb0259
[libc++] Fix initialization of __fill_

`basic_ios` delays initialization of `__fill_` to `widen(' ')` until `fill()` is called. But, `fill(char_type)` is missing this logic, so the fill character does not get initialized to whitespace if `fill(char_type)` is called first. This patch adds this logic to `fill(char_type)`.

Reviewed By: #libc, ldionne, Quuxplusone

Differential Revision: https://reviews.llvm.org/D120751
libcxx/include/ios
libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp