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:
51
lib/libcxx/include/algorithm
vendored
51
lib/libcxx/include/algorithm
vendored
@@ -42,6 +42,9 @@ namespace ranges {
|
||||
template <class I>
|
||||
struct in_found_result; // since C++20
|
||||
|
||||
template <class I, class T>
|
||||
struct in_value_result; // since C++23
|
||||
|
||||
template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
|
||||
indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20
|
||||
constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {});
|
||||
@@ -226,6 +229,14 @@ namespace ranges {
|
||||
template<class I1, class I2>
|
||||
using copy_backward_result = in_out_result<I1, I2>; // since C++20
|
||||
|
||||
template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
|
||||
requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
|
||||
constexpr bool ranges::contains(I first, S last, const T& value, Proj proj = {}); // since C++23
|
||||
|
||||
template<input_range R, class T, class Proj = identity>
|
||||
requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
|
||||
constexpr bool ranges::contains(R&& r, const T& value, Proj proj = {}); // since C++23
|
||||
|
||||
template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
|
||||
requires indirectly_copyable<I, O>
|
||||
constexpr ranges::copy_result<I, O> ranges::copy(I first, S last, O result); // since C++20
|
||||
@@ -447,6 +458,22 @@ namespace ranges {
|
||||
indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
|
||||
constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); // since C++20
|
||||
|
||||
template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
|
||||
class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
|
||||
requires (forward_iterator<I1> || sized_sentinel_for<S1, I1>) &&
|
||||
(forward_iterator<I2> || sized_sentinel_for<S2, I2>) &&
|
||||
indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
|
||||
constexpr bool ranges::ends_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
|
||||
Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++23
|
||||
|
||||
template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,
|
||||
class Proj2 = identity>
|
||||
requires (forward_range<R1> || sized_range<R1>) &&
|
||||
(forward_range<R2> || sized_range<R2>) &&
|
||||
indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
|
||||
constexpr bool ranges::ends_with(R1&& r1, R2&& r2, Pred pred = {},
|
||||
Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++23
|
||||
|
||||
template<input_iterator I, sentinel_for<I> S, class Proj = identity,
|
||||
indirect_unary_predicate<projected<I, Proj>> Pred>
|
||||
constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); // since C++20
|
||||
@@ -857,6 +884,23 @@ namespace ranges {
|
||||
ranges::search_n(R&& r, range_difference_t<R> count,
|
||||
const T& value, Pred pred = {}, Proj proj = {}); // since C++20
|
||||
|
||||
template<input_iterator I, sentinel_for<I> S, class T,
|
||||
indirectly-binary-left-foldable<T, I> F>
|
||||
constexpr auto ranges::fold_left(I first, S last, T init, F f); // since C++23
|
||||
|
||||
template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F>
|
||||
constexpr auto fold_left(R&& r, T init, F f); // since C++23
|
||||
|
||||
template<class I, class T>
|
||||
using fold_left_with_iter_result = in_value_result<I, T>; // since C++23
|
||||
|
||||
template<input_iterator I, sentinel_for<I> S, class T,
|
||||
indirectly-binary-left-foldable<T, I> F>
|
||||
constexpr see below fold_left_with_iter(I first, S last, T init, F f); // since C++23
|
||||
|
||||
template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F>
|
||||
constexpr see below fold_left_with_iter(R&& r, T init, F f); // since C++23
|
||||
|
||||
template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
|
||||
class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
|
||||
requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
|
||||
@@ -1738,7 +1782,6 @@ template <class BidirectionalIterator, class Compare>
|
||||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
#include <version>
|
||||
|
||||
#include <__algorithm/adjacent_find.h>
|
||||
@@ -1763,6 +1806,7 @@ template <class BidirectionalIterator, class Compare>
|
||||
#include <__algorithm/find_first_of.h>
|
||||
#include <__algorithm/find_if.h>
|
||||
#include <__algorithm/find_if_not.h>
|
||||
#include <__algorithm/fold.h>
|
||||
#include <__algorithm/for_each.h>
|
||||
#include <__algorithm/for_each_n.h>
|
||||
#include <__algorithm/generate.h>
|
||||
@@ -1811,13 +1855,16 @@ template <class BidirectionalIterator, class Compare>
|
||||
#include <__algorithm/pstl_any_all_none_of.h>
|
||||
#include <__algorithm/pstl_copy.h>
|
||||
#include <__algorithm/pstl_count.h>
|
||||
#include <__algorithm/pstl_equal.h>
|
||||
#include <__algorithm/pstl_fill.h>
|
||||
#include <__algorithm/pstl_find.h>
|
||||
#include <__algorithm/pstl_for_each.h>
|
||||
#include <__algorithm/pstl_generate.h>
|
||||
#include <__algorithm/pstl_is_partitioned.h>
|
||||
#include <__algorithm/pstl_merge.h>
|
||||
#include <__algorithm/pstl_move.h>
|
||||
#include <__algorithm/pstl_replace.h>
|
||||
#include <__algorithm/pstl_rotate_copy.h>
|
||||
#include <__algorithm/pstl_sort.h>
|
||||
#include <__algorithm/pstl_stable_sort.h>
|
||||
#include <__algorithm/pstl_transform.h>
|
||||
@@ -1827,12 +1874,14 @@ template <class BidirectionalIterator, class Compare>
|
||||
#include <__algorithm/ranges_any_of.h>
|
||||
#include <__algorithm/ranges_binary_search.h>
|
||||
#include <__algorithm/ranges_clamp.h>
|
||||
#include <__algorithm/ranges_contains.h>
|
||||
#include <__algorithm/ranges_copy.h>
|
||||
#include <__algorithm/ranges_copy_backward.h>
|
||||
#include <__algorithm/ranges_copy_if.h>
|
||||
#include <__algorithm/ranges_copy_n.h>
|
||||
#include <__algorithm/ranges_count.h>
|
||||
#include <__algorithm/ranges_count_if.h>
|
||||
#include <__algorithm/ranges_ends_with.h>
|
||||
#include <__algorithm/ranges_equal.h>
|
||||
#include <__algorithm/ranges_equal_range.h>
|
||||
#include <__algorithm/ranges_fill.h>
|
||||
|
||||
Reference in New Issue
Block a user