Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.

Reviewed by Howard.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson
2013-07-22 21:08:00 +00:00
parent da0a0e8a1b
commit b8e0d9086e
2 changed files with 55 additions and 2 deletions

View File

@@ -2011,8 +2011,8 @@ fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_)
{
return _VSTD::__fill_n(__first, __n, __value_, integral_constant<bool,
is_pointer<_OutputIterator>::value &&
is_trivially_copy_assignable<_Tp>::value &&
sizeof(_Tp) == 1>());
is_trivially_assignable<typename remove_pointer<_OutputIterator>::type, _Tp>::value &&
sizeof(typename remove_pointer<_OutputIterator>::type) == 1>());
}
// fill