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

Reviewed by Howard.

llvm-svn: 186875
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 8bb1dbbf7544eaac3afab8d1f91b71f383dab903
diff --git a/include/algorithm b/include/algorithm
index 703a9b3..19d016f 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -2011,8 +2011,8 @@
 {
    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