Skip to content

Commit b6f6fe9

Browse files
authored
[libc++] Remove unused defaulted template arg from __rewrap_range. (#67733)
Template argument `_Unwrapped` is always deduced from the type of `_Unwrapped __iter`.
1 parent 7a8c04e commit b6f6fe9

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

libcxx/include/__algorithm/unwrap_range.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct __unwrap_range_impl {
5050
}
5151

5252
_LIBCPP_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
53-
requires (!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
53+
requires(!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
5454
{
5555
return __iter;
5656
}
@@ -73,10 +73,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last)
7373
return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
7474
}
7575

76-
template <
77-
class _Sent,
78-
class _Iter,
79-
class _Unwrapped = decltype(std::__unwrap_range(std::declval<_Iter>(), std::declval<_Sent>()))>
76+
template < class _Sent, class _Iter, class _Unwrapped>
8077
_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
8178
return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
8279
}
@@ -86,7 +83,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_ra
8683
return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
8784
}
8885

89-
template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
86+
template <class _Iter, class _Unwrapped>
9087
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
9188
return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
9289
}

libcxx/utils/data/ignore_format.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ libcxx/include/__algorithm/swap_ranges.h
8484
libcxx/include/__algorithm/transform.h
8585
libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
8686
libcxx/include/__algorithm/unwrap_iter.h
87-
libcxx/include/__algorithm/unwrap_range.h
8887
libcxx/include/any
8988
libcxx/include/array
9089
libcxx/include/__atomic/atomic_base.h

0 commit comments

Comments
 (0)