Skip to content

Commit 15be57e

Browse files
Fix the wrong fix about __is_segmented_iterator_v
1 parent de5e1dd commit 15be57e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libcxx/include/__algorithm/fill_n.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <__memory/pointer_traits.h>
1919
#include <__type_traits/conjunction.h>
2020
#include <__type_traits/enable_if.h>
21+
#include <__type_traits/integral_constant.h>
2122
#include <__type_traits/negation.h>
2223
#include <__utility/convert_to_integral.h>
2324

@@ -37,8 +38,8 @@ template <class _OutputIterator,
3738
class _Tp
3839
#ifndef _LIBCPP_CXX03_LANG
3940
,
40-
__enable_if_t<!(__is_segmented_iterator_v<_OutputIterator> &&
41-
__has_random_access_local_iterator<_OutputIterator>::value),
41+
__enable_if_t<!_And<_BoolConstant<__is_segmented_iterator_v<_OutputIterator>>,
42+
__has_random_access_local_iterator<_OutputIterator>>::value,
4243
int> = 0
4344
#endif
4445
>
@@ -53,8 +54,8 @@ __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
5354
template < class _OutputIterator,
5455
class _Size,
5556
class _Tp,
56-
__enable_if_t<__is_segmented_iterator_v<_OutputIterator> &&
57-
__has_random_access_local_iterator<_OutputIterator>::value,
57+
__enable_if_t<_And<_BoolConstant<__is_segmented_iterator_v<_OutputIterator>>,
58+
__has_random_access_local_iterator<_OutputIterator>>::value,
5859
int> = 0>
5960
inline _LIBCPP_HIDE_FROM_ABI
6061
_LIBCPP_CONSTEXPR_SINCE_CXX14 _OutputIterator __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {

0 commit comments

Comments
 (0)