[libc++] Adds a test for std::fill_n.
authorMark de Wever <koraq@xs4all.nl>
Sat, 15 Jan 2022 12:48:54 +0000 (13:48 +0100)
committerMark de Wever <koraq@xs4all.nl>
Tue, 18 Jan 2022 18:27:02 +0000 (19:27 +0100)
commit8f4a6187f2cbeaf7ccdfd720a0dda626f3bbb46e
treeb6dd4ffb07f50bb6eca67e34159f177bfc1c8a37
parenta9f713f5ac59e4d05e251553c611d03d3a9a6f67
[libc++] Adds a test for std::fill_n.

The function `std::fill` requires a ForwardIterator, but `std::fill_n`
only requires an OutputIterator. Adds a test to validate `std::fill_n`
works with an OutputIterator.

Noticed this while working on LWG3539
format_to must not copy models of output_iterator<const charT&>

Reviewed By: #libc, Quuxplusone, ldionne

Differential Revision: https://reviews.llvm.org/D117395
libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp