Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-08-01 04:41:55 +0400
committerHoward Hinnant <hhinnant@apple.com>2013-08-01 04:41:55 +0400
commitce075cf1aa28c5cb09d48f3bcbc6dcb44ed08548 (patch)
treeb7f7243a7b9ed743fe77ece132ba16f01e34e8ab /libcxx/include/algorithm
parent03cd107364e95739f039b40b920cbaa215282956 (diff)
Constrain fill_n -> memset operations to include implicit convertibility to unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764. Also a drive-by fix on a chrono test suite bug.
llvm-svn: 187552
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 19d016fb7d5e..119fbbbbac4d 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2012,6 +2012,7 @@ 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_assignable<typename remove_pointer<_OutputIterator>::type, _Tp>::value &&
+ is_convertible<_Tp, unsigned char>::value &&
sizeof(typename remove_pointer<_OutputIterator>::type) == 1>());
}