libcxx: update to LLVM 18
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42 This adds the flag `-D_LIBCPP_HARDENING_MODE` which is determined based on the Zig optimization mode. This commit also fixes libunwind, libcxx, and libcxxabi to properly report sub compilation errors.
This commit is contained in:
14
lib/libcxx/include/__algorithm/unwrap_range.h
vendored
14
lib/libcxx/include/__algorithm/unwrap_range.h
vendored
@@ -22,6 +22,9 @@
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
// __unwrap_range and __rewrap_range are used to unwrap ranges which may have different iterator and sentinel types.
|
||||
@@ -50,7 +53,7 @@ struct __unwrap_range_impl {
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
|
||||
requires (!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
|
||||
requires(!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
|
||||
{
|
||||
return __iter;
|
||||
}
|
||||
@@ -73,10 +76,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last)
|
||||
return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
|
||||
}
|
||||
|
||||
template <
|
||||
class _Sent,
|
||||
class _Iter,
|
||||
class _Unwrapped = decltype(std::__unwrap_range(std::declval<_Iter>(), std::declval<_Sent>()))>
|
||||
template < class _Sent, class _Iter, class _Unwrapped>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
|
||||
return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
|
||||
}
|
||||
@@ -86,7 +86,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_ra
|
||||
return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
|
||||
}
|
||||
|
||||
template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
|
||||
template <class _Iter, class _Unwrapped>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
|
||||
return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
|
||||
}
|
||||
@@ -94,4 +94,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter,
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
|
||||
|
||||
Reference in New Issue
Block a user