Skip to content

Commit de5e1dd

Browse files
Update to use __is_segmented_iterator_v, take 3
1 parent cb6e3a7 commit de5e1dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcxx/include/__algorithm/fill_n.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ template <class _OutputIterator,
3737
class _Tp
3838
#ifndef _LIBCPP_CXX03_LANG
3939
,
40-
__enable_if_t<!_And<__is_segmented_iterator<_OutputIterator>,
41-
__has_random_access_local_iterator<_OutputIterator> >::value,
40+
__enable_if_t<!(__is_segmented_iterator_v<_OutputIterator> &&
41+
__has_random_access_local_iterator<_OutputIterator>::value),
4242
int> = 0
4343
#endif
4444
>
@@ -53,11 +53,11 @@ __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
5353
template < class _OutputIterator,
5454
class _Size,
5555
class _Tp,
56-
__enable_if_t<_And<__is_segmented_iterator<_OutputIterator>,
57-
__has_random_access_local_iterator<_OutputIterator> >::value,
56+
__enable_if_t<__is_segmented_iterator_v<_OutputIterator> &&
57+
__has_random_access_local_iterator<_OutputIterator>::value,
5858
int> = 0>
59-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _OutputIterator
60-
__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
59+
inline _LIBCPP_HIDE_FROM_ABI
60+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _OutputIterator __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
6161
using __local_iterator_t = typename __segmented_iterator_traits<_OutputIterator>::__local_iterator;
6262
return std::__for_each_n_segment(__first, __n, [&](__local_iterator_t __lfirst, __local_iterator_t __llast) {
6363
std::__fill_n(__lfirst, __llast - __lfirst, __value);

0 commit comments

Comments
 (0)