Add std::copy_n istreambuf_iterator specialization
authorFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 6 Oct 2019 15:29:04 +0000 (15:29 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 6 Oct 2019 15:29:04 +0000 (15:29 +0000)
commit8ab38f6cbc16025515571cd40f0f0d872d39c5ba
tree347b3844ba6d144b3295a26fef1558ee4bec7c25
parent6e556303102ebadb15bf8b7b16f6693d8ffde371
Add std::copy_n istreambuf_iterator specialization

* include/bits/stl_algo.h
(__copy_n_a(_IIte, _Size, _OIte)): New.
(__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
(__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
latter.
* include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
std::__copy_n_a friend.
(__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.

From-SVN: r276638
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/bits/streambuf_iterator.h
libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc [new file with mode: 0644]