Commit 5daedc02 by François Dumont

Add std::copy_n istreambuf_iterator specialization

	Commit this missing part which had been rejected.

From-SVN: r276640
parent 1c826400
......@@ -778,8 +778,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _InputIterator, typename _Size, typename _OutputIterator>
_GLIBCXX20_CONSTEXPR
_OutputIterator
__copy_n(_InputIterator __first, _Size __n,
_OutputIterator __result, input_iterator_tag)
__copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result)
{
if (__n > 0)
{
......@@ -795,6 +794,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
return __result;
}
template<typename _CharT, typename _Size>
__enable_if_t<__is_char<_CharT>::__value, _CharT*>
__copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT>>,
_Size, _CharT*);
template<typename _InputIterator, typename _Size, typename _OutputIterator>
_GLIBCXX20_CONSTEXPR
_OutputIterator
__copy_n(_InputIterator __first, _Size __n,
_OutputIterator __result, input_iterator_tag)
{
return std::__niter_wrap(__result,
__copy_n_a(__first, __n,
std::__niter_base(__result)));
}
template<typename _RandomAccessIterator, typename _Size,
typename _OutputIterator>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment