[llvm-branch-commits] [libcxx] [libc++][C++03] Remove macros that expand to nothing (PR #134046)
Nikolas Klauser via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Apr 2 00:56:40 PDT 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/134046
None
>From 15a89013733d5d1b4ffd2423fe6b0912d24d7a66 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sat, 4 Jan 2025 16:35:32 +0100
Subject: [PATCH] [libc++][C++03] Remove macros that expand to nothing
---
.../__cxx03/__algorithm/adjacent_find.h | 7 +-
libcxx/include/__cxx03/__algorithm/all_of.h | 2 +-
libcxx/include/__cxx03/__algorithm/any_of.h | 2 +-
.../__cxx03/__algorithm/binary_search.h | 4 +-
libcxx/include/__cxx03/__algorithm/comp.h | 4 +-
.../__cxx03/__algorithm/comp_ref_type.h | 13 +-
libcxx/include/__cxx03/__algorithm/copy.h | 24 +-
.../__cxx03/__algorithm/copy_backward.h | 19 +-
libcxx/include/__cxx03/__algorithm/copy_if.h | 2 +-
.../__cxx03/__algorithm/copy_move_common.h | 10 +-
libcxx/include/__cxx03/__algorithm/copy_n.h | 6 +-
libcxx/include/__cxx03/__algorithm/count.h | 8 +-
libcxx/include/__cxx03/__algorithm/count_if.h | 3 +-
libcxx/include/__cxx03/__algorithm/equal.h | 8 +-
.../include/__cxx03/__algorithm/equal_range.h | 6 +-
libcxx/include/__cxx03/__algorithm/fill.h | 7 +-
libcxx/include/__cxx03/__algorithm/fill_n.h | 14 +-
libcxx/include/__cxx03/__algorithm/find.h | 23 +-
libcxx/include/__cxx03/__algorithm/find_end.h | 12 +-
.../__cxx03/__algorithm/find_first_of.h | 6 +-
libcxx/include/__cxx03/__algorithm/find_if.h | 2 +-
.../include/__cxx03/__algorithm/find_if_not.h | 2 +-
.../__cxx03/__algorithm/find_segment_if.h | 2 +-
libcxx/include/__cxx03/__algorithm/for_each.h | 3 +-
.../__cxx03/__algorithm/for_each_segment.h | 3 +-
libcxx/include/__cxx03/__algorithm/generate.h | 3 +-
.../include/__cxx03/__algorithm/generate_n.h | 3 +-
.../__cxx03/__algorithm/half_positive.h | 4 +-
libcxx/include/__cxx03/__algorithm/includes.h | 6 +-
libcxx/include/__cxx03/__algorithm/is_heap.h | 4 +-
.../__cxx03/__algorithm/is_heap_until.h | 6 +-
.../__cxx03/__algorithm/is_partitioned.h | 2 +-
.../__cxx03/__algorithm/is_permutation.h | 14 +-
.../include/__cxx03/__algorithm/is_sorted.h | 5 +-
.../__cxx03/__algorithm/is_sorted_until.h | 6 +-
.../include/__cxx03/__algorithm/iter_swap.h | 4 +-
.../__cxx03/__algorithm/iterator_operations.h | 29 +-
.../__algorithm/lexicographical_compare.h | 6 +-
.../include/__cxx03/__algorithm/lower_bound.h | 10 +-
.../include/__cxx03/__algorithm/make_heap.h | 7 +-
.../__cxx03/__algorithm/make_projected.h | 12 +-
libcxx/include/__cxx03/__algorithm/max.h | 4 +-
.../include/__cxx03/__algorithm/max_element.h | 6 +-
libcxx/include/__cxx03/__algorithm/merge.h | 6 +-
libcxx/include/__cxx03/__algorithm/min.h | 4 +-
.../include/__cxx03/__algorithm/min_element.h | 9 +-
libcxx/include/__cxx03/__algorithm/minmax.h | 4 +-
.../__cxx03/__algorithm/minmax_element.h | 11 +-
libcxx/include/__cxx03/__algorithm/mismatch.h | 14 +-
libcxx/include/__cxx03/__algorithm/move.h | 25 +-
.../__cxx03/__algorithm/move_backward.h | 18 +-
.../__cxx03/__algorithm/next_permutation.h | 7 +-
libcxx/include/__cxx03/__algorithm/none_of.h | 2 +-
.../include/__cxx03/__algorithm/nth_element.h | 10 +-
.../__cxx03/__algorithm/partial_sort.h | 8 +-
.../__cxx03/__algorithm/partial_sort_copy.h | 6 +-
.../include/__cxx03/__algorithm/partition.h | 8 +-
.../__cxx03/__algorithm/partition_copy.h | 2 +-
.../__cxx03/__algorithm/partition_point.h | 2 +-
libcxx/include/__cxx03/__algorithm/pop_heap.h | 7 +-
.../__cxx03/__algorithm/prev_permutation.h | 7 +-
.../include/__cxx03/__algorithm/push_heap.h | 9 +-
libcxx/include/__cxx03/__algorithm/remove.h | 2 +-
.../include/__cxx03/__algorithm/remove_copy.h | 2 +-
.../__cxx03/__algorithm/remove_copy_if.h | 2 +-
.../include/__cxx03/__algorithm/remove_if.h | 2 +-
libcxx/include/__cxx03/__algorithm/replace.h | 2 +-
.../__cxx03/__algorithm/replace_copy.h | 2 +-
.../__cxx03/__algorithm/replace_copy_if.h | 2 +-
.../include/__cxx03/__algorithm/replace_if.h | 2 +-
libcxx/include/__cxx03/__algorithm/reverse.h | 9 +-
.../__cxx03/__algorithm/reverse_copy.h | 2 +-
libcxx/include/__cxx03/__algorithm/rotate.h | 22 +-
.../include/__cxx03/__algorithm/rotate_copy.h | 2 +-
libcxx/include/__cxx03/__algorithm/search.h | 12 +-
libcxx/include/__cxx03/__algorithm/search_n.h | 12 +-
.../__cxx03/__algorithm/set_difference.h | 7 +-
.../__cxx03/__algorithm/set_intersection.h | 21 +-
.../__algorithm/set_symmetric_difference.h | 9 +-
.../include/__cxx03/__algorithm/set_union.h | 9 +-
libcxx/include/__cxx03/__algorithm/shuffle.h | 13 +-
.../include/__cxx03/__algorithm/sift_down.h | 4 +-
libcxx/include/__cxx03/__algorithm/sort.h | 20 +-
.../include/__cxx03/__algorithm/sort_heap.h | 7 +-
.../include/__cxx03/__algorithm/swap_ranges.h | 6 +-
.../include/__cxx03/__algorithm/transform.h | 4 +-
libcxx/include/__cxx03/__algorithm/unique.h | 6 +-
.../include/__cxx03/__algorithm/unique_copy.h | 10 +-
.../include/__cxx03/__algorithm/unwrap_iter.h | 15 +-
.../__cxx03/__algorithm/unwrap_range.h | 4 +-
.../include/__cxx03/__algorithm/upper_bound.h | 6 +-
libcxx/include/__cxx03/__atomic/atomic.h | 10 +-
libcxx/include/__cxx03/__atomic/atomic_base.h | 6 +-
libcxx/include/__cxx03/__atomic/atomic_flag.h | 2 +-
.../__cxx03/__atomic/cxx_atomic_impl.h | 8 +-
.../include/__cxx03/__atomic/to_gcc_order.h | 4 +-
libcxx/include/__cxx03/__bit/blsr.h | 6 +-
libcxx/include/__cxx03/__bit/countl.h | 12 +-
libcxx/include/__cxx03/__bit/countr.h | 10 +-
libcxx/include/__cxx03/__bit/invert_if.h | 2 +-
libcxx/include/__cxx03/__bit/popcount.h | 10 +-
libcxx/include/__cxx03/__bit/rotate.h | 4 +-
libcxx/include/__cxx03/__bit_reference | 161 ++--
libcxx/include/__cxx03/__chrono/duration.h | 97 +-
.../include/__cxx03/__chrono/steady_clock.h | 2 +-
.../include/__cxx03/__chrono/system_clock.h | 2 +-
libcxx/include/__cxx03/__chrono/time_point.h | 38 +-
.../__condition_variable/condition_variable.h | 2 +-
libcxx/include/__cxx03/__config | 27 -
.../__cxx03/__debug_utils/randomize_range.h | 2 +-
.../__cxx03/__debug_utils/sanitizers.h | 2 +-
.../strict_weak_ordering_check.h | 2 +-
.../__cxx03/__functional/binary_function.h | 8 +-
.../__cxx03/__functional/binary_negate.h | 12 +-
.../include/__cxx03/__functional/binder1st.h | 5 +-
.../include/__cxx03/__functional/binder2nd.h | 5 +-
.../include/__cxx03/__functional/identity.h | 2 +-
libcxx/include/__cxx03/__functional/mem_fn.h | 9 +-
.../__cxx03/__functional/mem_fun_ref.h | 37 +-
.../include/__cxx03/__functional/operations.h | 68 +-
.../__functional/pointer_to_binary_function.h | 6 +-
.../__functional/pointer_to_unary_function.h | 6 +-
.../__cxx03/__functional/reference_wrapper.h | 21 +-
.../__cxx03/__functional/unary_function.h | 6 +-
.../__cxx03/__functional/unary_negate.h | 14 +-
.../__cxx03/__functional/weak_result_type.h | 22 +-
libcxx/include/__cxx03/__fwd/array.h | 4 +-
libcxx/include/__cxx03/__fwd/pair.h | 6 +-
libcxx/include/__cxx03/__hash_table | 73 +-
libcxx/include/__cxx03/__iterator/access.h | 4 +-
libcxx/include/__cxx03/__iterator/advance.h | 8 +-
.../__cxx03/__iterator/back_insert_iterator.h | 21 +-
.../include/__cxx03/__iterator/bounded_iter.h | 58 +-
libcxx/include/__cxx03/__iterator/distance.h | 6 +-
.../__iterator/front_insert_iterator.h | 19 +-
.../__cxx03/__iterator/insert_iterator.h | 18 +-
.../__cxx03/__iterator/istream_iterator.h | 2 +-
.../__cxx03/__iterator/istreambuf_iterator.h | 2 +-
libcxx/include/__cxx03/__iterator/iterator.h | 2 +-
.../__cxx03/__iterator/move_iterator.h | 66 +-
libcxx/include/__cxx03/__iterator/next.h | 2 +-
libcxx/include/__cxx03/__iterator/prev.h | 2 +-
.../__cxx03/__iterator/reverse_iterator.h | 80 +-
libcxx/include/__cxx03/__iterator/wrap_iter.h | 81 +-
libcxx/include/__cxx03/__locale | 14 +-
libcxx/include/__cxx03/__math/traits.h | 48 +-
libcxx/include/__cxx03/__memory/addressof.h | 2 +-
.../__cxx03/__memory/allocate_at_least.h | 3 +-
libcxx/include/__cxx03/__memory/allocator.h | 67 +-
.../__cxx03/__memory/allocator_traits.h | 30 +-
.../include/__cxx03/__memory/assume_aligned.h | 2 +-
libcxx/include/__cxx03/__memory/auto_ptr.h | 6 +-
.../__cxx03/__memory/builtin_new_allocator.h | 2 +-
.../__cxx03/__memory/compressed_pair.h | 52 +-
.../include/__cxx03/__memory/construct_at.h | 11 +-
.../include/__cxx03/__memory/pointer_traits.h | 15 +-
.../__cxx03/__memory/raw_storage_iterator.h | 4 +-
libcxx/include/__cxx03/__memory/shared_ptr.h | 25 +-
.../include/__cxx03/__memory/swap_allocator.h | 11 +-
libcxx/include/__cxx03/__memory/temp_value.h | 11 +-
.../__cxx03/__memory/temporary_buffer.h | 4 +-
.../__memory/uninitialized_algorithms.h | 19 +-
libcxx/include/__cxx03/__memory/unique_ptr.h | 144 ++-
libcxx/include/__cxx03/__memory/voidify.h | 2 +-
libcxx/include/__cxx03/__mutex/mutex.h | 2 +-
libcxx/include/__cxx03/__mutex/once_flag.h | 2 +-
libcxx/include/__cxx03/__numeric/accumulate.h | 5 +-
.../__cxx03/__numeric/adjacent_difference.h | 8 +-
.../include/__cxx03/__numeric/inner_product.h | 4 +-
libcxx/include/__cxx03/__numeric/iota.h | 3 +-
.../include/__cxx03/__numeric/partial_sum.h | 8 +-
.../__cxx03/__random/clamp_to_integral.h | 2 +-
.../__cxx03/__random/discard_block_engine.h | 12 +-
.../__random/independent_bits_engine.h | 47 +-
.../__cxx03/__random/is_seed_sequence.h | 2 +-
.../__random/linear_congruential_engine.h | 32 +-
.../__random/mersenne_twister_engine.h | 168 +---
.../include/__cxx03/__random/random_device.h | 8 +-
.../__cxx03/__random/shuffle_order_engine.h | 20 +-
.../__random/subtract_with_carry_engine.h | 27 +-
.../__random/uniform_int_distribution.h | 6 +-
libcxx/include/__cxx03/__split_buffer | 191 ++--
libcxx/include/__cxx03/__string/char_traits.h | 138 +--
.../__cxx03/__string/constexpr_c_functions.h | 23 +-
.../__cxx03/__system_error/error_category.h | 2 +-
.../__cxx03/__thread/poll_with_backoff.h | 4 +-
libcxx/include/__cxx03/__thread/this_thread.h | 2 +-
libcxx/include/__cxx03/__tree | 48 +-
.../__cxx03/__type_traits/aligned_storage.h | 4 +-
.../__cxx03/__type_traits/aligned_union.h | 2 +-
.../__cxx03/__type_traits/integral_constant.h | 6 +-
libcxx/include/__cxx03/__type_traits/invoke.h | 25 +-
.../__type_traits/is_constant_evaluated.h | 2 +-
.../__cxx03/__type_traits/is_literal_type.h | 3 +-
.../__cxx03/__type_traits/is_swappable.h | 6 +-
.../include/__cxx03/__type_traits/result_of.h | 2 +-
.../__cxx03/__utility/convert_to_integral.h | 25 +-
.../__cxx03/__utility/exception_guard.h | 25 +-
libcxx/include/__cxx03/__utility/forward.h | 4 +-
.../__cxx03/__utility/is_pointer_in_range.h | 4 +-
.../__cxx03/__utility/is_valid_range.h | 3 +-
libcxx/include/__cxx03/__utility/move.h | 4 +-
libcxx/include/__cxx03/__utility/no_destroy.h | 2 +-
libcxx/include/__cxx03/__utility/pair.h | 58 +-
libcxx/include/__cxx03/__utility/rel_ops.h | 8 +-
libcxx/include/__cxx03/__utility/swap.h | 6 +-
libcxx/include/__cxx03/array | 121 ++-
libcxx/include/__cxx03/bitset | 310 +++----
libcxx/include/__cxx03/cmath | 12 +-
libcxx/include/__cxx03/codecvt | 24 +-
libcxx/include/__cxx03/complex | 272 +++---
libcxx/include/__cxx03/cwchar | 9 +-
libcxx/include/__cxx03/deque | 31 +-
libcxx/include/__cxx03/forward_list | 29 +-
libcxx/include/__cxx03/limits | 632 ++++++-------
libcxx/include/__cxx03/list | 33 +-
libcxx/include/__cxx03/locale | 13 +-
libcxx/include/__cxx03/map | 49 +-
libcxx/include/__cxx03/new | 4 +-
libcxx/include/__cxx03/queue | 20 +-
libcxx/include/__cxx03/ratio | 16 +-
libcxx/include/__cxx03/regex | 24 +-
libcxx/include/__cxx03/set | 30 +-
libcxx/include/__cxx03/stack | 7 +-
libcxx/include/__cxx03/string | 852 ++++++++----------
libcxx/include/__cxx03/string_view | 234 ++---
libcxx/include/__cxx03/typeinfo | 10 +-
libcxx/include/__cxx03/unordered_map | 60 +-
libcxx/include/__cxx03/unordered_set | 16 +-
libcxx/include/__cxx03/vector | 661 +++++++-------
230 files changed, 2783 insertions(+), 3893 deletions(-)
diff --git a/libcxx/include/__cxx03/__algorithm/adjacent_find.h b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
index 6add0f3fe2b53..ac233233bbc74 100644
--- a/libcxx/include/__cxx03/__algorithm/adjacent_find.h
+++ b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
@@ -26,8 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
-__adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Iter __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
if (__first == __last)
return __first;
_Iter __i = __first;
@@ -40,13 +39,13 @@ __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
}
template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
return std::adjacent_find(std::move(__first), std::move(__last), __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/all_of.h b/libcxx/include/__cxx03/__algorithm/all_of.h
index fe46ee5fca43c..8bc39b027e40b 100644
--- a/libcxx/include/__cxx03/__algorithm/all_of.h
+++ b/libcxx/include/__cxx03/__algorithm/all_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/any_of.h b/libcxx/include/__cxx03/__algorithm/any_of.h
index 26bf3996e8a6f..6b3462a91a9f4 100644
--- a/libcxx/include/__cxx03/__algorithm/any_of.h
+++ b/libcxx/include/__cxx03/__algorithm/any_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/binary_search.h b/libcxx/include/__cxx03/__algorithm/binary_search.h
index a72da8e396639..37e273944554c 100644
--- a/libcxx/include/__cxx03/__algorithm/binary_search.h
+++ b/libcxx/include/__cxx03/__algorithm/binary_search.h
@@ -22,14 +22,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
__first = std::lower_bound<_ForwardIterator, _Tp, __comp_ref_type<_Compare> >(__first, __last, __value, __comp);
return __first != __last && !__comp(__value, *__first);
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::binary_search(__first, __last, __value, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/comp.h b/libcxx/include/__cxx03/__algorithm/comp.h
index 0c638b4e4a651..420c4344e0af7 100644
--- a/libcxx/include/__cxx03/__algorithm/comp.h
+++ b/libcxx/include/__cxx03/__algorithm/comp.h
@@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __equal_to {
template <class _T1, class _T2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _T1& __x, const _T2& __y) const {
return __x == __y;
}
};
@@ -36,7 +36,7 @@ struct __less {};
template <>
struct __less<void, void> {
template <class _Tp, class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
return __lhs < __rhs;
}
};
diff --git a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
index ab793da0ad293..bf4d07c89d123 100644
--- a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
@@ -22,10 +22,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare>
struct __debug_less {
_Compare& __comp_;
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI __debug_less(_Compare& __c) : __comp_(__c) {}
+ _LIBCPP_HIDE_FROM_ABI __debug_less(_Compare& __c) : __comp_(__c) {}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Up& __y) {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Up& __y) {
bool __r = __comp_(__x, __y);
if (__r)
__do_compare_assert(0, __y, __x);
@@ -33,7 +33,7 @@ struct __debug_less {
}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(_Tp& __x, _Up& __y) {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(_Tp& __x, _Up& __y) {
bool __r = __comp_(__x, __y);
if (__r)
__do_compare_assert(0, __y, __x);
@@ -41,16 +41,15 @@ struct __debug_less {
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 inline
- _LIBCPP_HIDE_FROM_ABI decltype((void)std::declval<_Compare&>()(std::declval<_LHS&>(), std::declval<_RHS&>()))
- __do_compare_assert(int, _LHS& __l, _RHS& __r) {
+ inline _LIBCPP_HIDE_FROM_ABI decltype((void)std::declval<_Compare&>()(std::declval<_LHS&>(), std::declval<_RHS&>()))
+ __do_compare_assert(int, _LHS& __l, _RHS& __r) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering");
(void)__l;
(void)__r;
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {}
+ inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {}
};
// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference.
diff --git a/libcxx/include/__cxx03/__algorithm/copy.h b/libcxx/include/__cxx03/__algorithm/copy.h
index 2aa0ab78b7858..ab164a8f9af51 100644
--- a/libcxx/include/__cxx03/__algorithm/copy.h
+++ b/libcxx/include/__cxx03/__algorithm/copy.h
@@ -29,13 +29,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
+inline _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
template <class _AlgPolicy>
struct __copy_impl {
template <class _InIter, class _Sent, class _OutIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _Sent __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
while (__first != __last) {
*__result = *__first;
++__first;
@@ -51,18 +50,16 @@ struct __copy_impl {
_OutIter& __result_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit _CopySegment(_OutIter& __result)
- : __result_(__result) {}
+ _LIBCPP_HIDE_FROM_ABI explicit _CopySegment(_OutIter& __result) : __result_(__result) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+ _LIBCPP_HIDE_FROM_ABI void
operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
__result_ = std::__copy<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
}
};
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
std::__for_each_segment(__first, __last, _CopySegment<_InIter, _OutIter>(__result));
return std::make_pair(__last, std::move(__result));
}
@@ -72,8 +69,7 @@ struct __copy_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
using _DiffT = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
@@ -97,21 +93,19 @@ struct __copy_impl {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_trivial_impl(__first, __last, __result);
}
};
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
-__copy(_InIter __first, _Sent __last, _OutIter __result) {
+pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI __copy(_InIter __first, _Sent __last, _OutIter __result) {
return std::__copy_move_unwrap_iters<__copy_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
return std::__copy<_ClassicAlgPolicy>(__first, __last, __result).second;
}
diff --git a/libcxx/include/__cxx03/__algorithm/copy_backward.h b/libcxx/include/__cxx03/__algorithm/copy_backward.h
index 9262d13d6c175..0a84b6ed27a98 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_backward.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_backward.h
@@ -29,14 +29,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InIter, _OutIter>
-__copy_backward(_InIter __first, _Sent __last, _OutIter __result);
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __copy_backward(_InIter __first, _Sent __last, _OutIter __result);
template <class _AlgPolicy>
struct __copy_backward_impl {
template <class _InIter, class _Sent, class _OutIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _Sent __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
auto __last_iter = _IterOps<_AlgPolicy>::next(__first, __last);
auto __original_last_iter = __last_iter;
@@ -48,8 +46,7 @@ struct __copy_backward_impl {
}
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_InIter>;
auto __sfirst = _Traits::__segment(__first);
auto __slast = _Traits::__segment(__last);
@@ -79,8 +76,7 @@ struct __copy_backward_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
auto __orig_last = __last;
auto __segment_iterator = _Traits::__segment(__result);
@@ -107,21 +103,20 @@ struct __copy_backward_impl {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_backward_trivial_impl(__first, __last, __result);
}
};
template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator1, _BidirectionalIterator2>
__copy_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
return std::__copy_move_unwrap_iters<__copy_backward_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
+inline _LIBCPP_HIDE_FROM_ABI _BidirectionalIterator2
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
static_assert(std::is_copy_constructible<_BidirectionalIterator1>::value &&
std::is_copy_constructible<_BidirectionalIterator1>::value,
diff --git a/libcxx/include/__cxx03/__algorithm/copy_if.h b/libcxx/include/__cxx03/__algorithm/copy_if.h
index 2db0c26fb86be..53a85bc51d8ec 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_if.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) {
for (; __first != __last; ++__first) {
if (__pred(*__first)) {
diff --git a/libcxx/include/__cxx03/__algorithm/copy_move_common.h b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
index 637b5a01daa75..8d1ba8e39b8bc 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_move_common.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
@@ -58,8 +58,7 @@ struct __can_lower_move_assignment_to_memmove {
// `memmove` algorithms implementation.
template <class _In, class _Out>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
-__copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
+_LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> __copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
const size_t __n = static_cast<size_t>(__last - __first);
std::__constexpr_memmove(__result, __first, __element_count(__n));
@@ -68,8 +67,7 @@ __copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
}
template <class _In, class _Out>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
-__copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {
+_LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> __copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {
const size_t __n = static_cast<size_t>(__last - __first);
__result -= __n;
@@ -89,7 +87,7 @@ template <class _Algorithm,
class _Sent,
class _OutIter,
__enable_if_t<__can_rewrap<_InIter, _OutIter>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter>
__copy_move_unwrap_iters(_InIter __first, _Sent __last, _OutIter __out_first) {
auto __range = std::__unwrap_range(__first, std::move(__last));
auto __result = _Algorithm()(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__out_first));
@@ -102,7 +100,7 @@ template <class _Algorithm,
class _Sent,
class _OutIter,
__enable_if_t<!__can_rewrap<_InIter, _OutIter>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter>
__copy_move_unwrap_iters(_InIter __first, _Sent __last, _OutIter __out_first) {
return _Algorithm()(std::move(__first), std::move(__last), std::move(__out_first));
}
diff --git a/libcxx/include/__cxx03/__algorithm/copy_n.h b/libcxx/include/__cxx03/__algorithm/copy_n.h
index aedb232b1bd5e..b32b908d89585 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_n.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_n.h
@@ -27,8 +27,7 @@ template <class _InputIterator,
__enable_if_t<__has_input_iterator_category<_InputIterator>::value &&
!__has_random_access_iterator_category<_InputIterator>::value,
int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
if (__n > 0) {
@@ -47,8 +46,7 @@ template <class _InputIterator,
class _Size,
class _OutputIterator,
__enable_if_t<__has_random_access_iterator_category<_InputIterator>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
diff --git a/libcxx/include/__cxx03/__algorithm/count.h b/libcxx/include/__cxx03/__algorithm/count.h
index 28cc28f76dd8f..5440fd031a1d3 100644
--- a/libcxx/include/__cxx03/__algorithm/count.h
+++ b/libcxx/include/__cxx03/__algorithm/count.h
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// generic implementation
template <class _AlgPolicy, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>
+_LIBCPP_HIDE_FROM_ABI typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>
__count(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
typename _IterOps<_AlgPolicy>::template __difference_type<_Iter> __r(0);
for (; __first != __last; ++__first)
@@ -42,7 +42,7 @@ __count(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
// __bit_iterator implementation
template <bool _ToCount, class _Cp, bool _IsConst>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bit_iterator<_Cp, _IsConst>::difference_type
+_LIBCPP_HIDE_FROM_ABI typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) {
using _It = __bit_iterator<_Cp, _IsConst>;
using __storage_type = typename _It::__storage_type;
@@ -71,7 +71,7 @@ __count_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
}
template <class, class _Cp, bool _IsConst, class _Tp, class _Proj, __enable_if_t<__is_identity<_Proj>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __iter_diff_t<__bit_iterator<_Cp, _IsConst> >
+_LIBCPP_HIDE_FROM_ABI __iter_diff_t<__bit_iterator<_Cp, _IsConst> >
__count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
if (__value)
return std::__count_bool<true>(__first, static_cast<typename _Cp::size_type>(__last - __first));
@@ -79,7 +79,7 @@ __count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __l
}
template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __iter_diff_t<_InputIterator>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI __iter_diff_t<_InputIterator>
count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
__identity __proj;
return std::__count<_ClassicAlgPolicy>(__first, __last, __value, __proj);
diff --git a/libcxx/include/__cxx03/__algorithm/count_if.h b/libcxx/include/__cxx03/__algorithm/count_if.h
index d333e86189176..8a31989cf8a33 100644
--- a/libcxx/include/__cxx03/__algorithm/count_if.h
+++ b/libcxx/include/__cxx03/__algorithm/count_if.h
@@ -20,8 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-typename iterator_traits<_InputIterator>::difference_type
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI typename iterator_traits<_InputIterator>::difference_type
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
typename iterator_traits<_InputIterator>::difference_type __r(0);
for (; __first != __last; ++__first)
diff --git a/libcxx/include/__cxx03/__algorithm/equal.h b/libcxx/include/__cxx03/__algorithm/equal.h
index e1d458590e614..5dbc75720e2a0 100644
--- a/libcxx/include/__cxx03/__algorithm/equal.h
+++ b/libcxx/include/__cxx03/__algorithm/equal.h
@@ -34,7 +34,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __equal_iter_impl(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool __equal_iter_impl(
_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate& __pred) {
for (; __first1 != __last1; ++__first1, (void)++__first2)
if (!__pred(*__first1, *__first2))
@@ -48,20 +48,20 @@ template <class _Tp,
__enable_if_t<__desugars_to_v<__equal_tag, _BinaryPredicate, _Tp, _Up> && !is_volatile<_Tp>::value &&
!is_volatile<_Up>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
int> = 0>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
__equal_iter_impl(_Tp* __first1, _Tp* __last1, _Up* __first2, _BinaryPredicate&) {
return std::__constexpr_memcmp_equal(__first1, __first2, __element_count(__last1 - __first1));
}
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
return std::__equal_iter_impl(
std::__unwrap_iter(__first1), std::__unwrap_iter(__last1), std::__unwrap_iter(__first2), __pred);
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
return std::equal(__first1, __last1, __first2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/equal_range.h b/libcxx/include/__cxx03/__algorithm/equal_range.h
index c2d23cdf0df4a..e84b536415c20 100644
--- a/libcxx/include/__cxx03/__algorithm/equal_range.h
+++ b/libcxx/include/__cxx03/__algorithm/equal_range.h
@@ -37,7 +37,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter, _Iter>
+_LIBCPP_HIDE_FROM_ABI pair<_Iter, _Iter>
__equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
_Iter __end = _IterOps<_AlgPolicy>::next(__first, __last);
@@ -60,7 +60,7 @@ __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible");
@@ -73,7 +73,7 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::equal_range(std::move(__first), std::move(__last), __value, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/fill.h b/libcxx/include/__cxx03/__algorithm/fill.h
index 4aaf2744e8a58..c1b92ddf293cf 100644
--- a/libcxx/include/__cxx03/__algorithm/fill.h
+++ b/libcxx/include/__cxx03/__algorithm/fill.h
@@ -22,21 +22,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag) {
for (; __first != __last; ++__first)
*__first = __value;
}
template <class _RandomAccessIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag) {
std::fill_n(__first, __last - __first, __value);
}
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
+inline _LIBCPP_HIDE_FROM_ABI void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
std::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
}
diff --git a/libcxx/include/__cxx03/__algorithm/fill_n.h b/libcxx/include/__cxx03/__algorithm/fill_n.h
index 99b712c7b0360..b52f650241176 100644
--- a/libcxx/include/__cxx03/__algorithm/fill_n.h
+++ b/libcxx/include/__cxx03/__algorithm/fill_n.h
@@ -28,12 +28,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value);
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value);
template <bool _FillVal, class _Cp>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
-__fill_n_bool(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) {
+_LIBCPP_HIDE_FROM_ABI void __fill_n_bool(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) {
using _It = __bit_iterator<_Cp, false>;
using __storage_type = typename _It::__storage_type;
@@ -66,7 +64,7 @@ __fill_n_bool(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) {
}
template <class _Cp, class _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false>
+inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__fill_n(__bit_iterator<_Cp, false> __first, _Size __n, const bool& __value) {
if (__n > 0) {
if (__value)
@@ -78,16 +76,14 @@ __fill_n(__bit_iterator<_Cp, false> __first, _Size __n, const bool& __value) {
}
template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
for (; __n > 0; ++__first, (void)--__n)
*__first = __value;
return __first;
}
template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) {
return std::__fill_n(__first, std::__convert_to_integral(__n), __value);
}
diff --git a/libcxx/include/__cxx03/__algorithm/find.h b/libcxx/include/__cxx03/__algorithm/find.h
index 8afa8cb389d16..ddf8201c6e951 100644
--- a/libcxx/include/__cxx03/__algorithm/find.h
+++ b/libcxx/include/__cxx03/__algorithm/find.h
@@ -41,8 +41,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// generic implementation
template <class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter
-__find(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
+_LIBCPP_HIDE_FROM_ABI _Iter __find(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
for (; __first != __last; ++__first)
if (std::__invoke(__proj, *__first) == __value)
break;
@@ -56,7 +55,7 @@ template <class _Tp,
__enable_if_t<__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
sizeof(_Tp) == 1,
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
if (auto __ret = std::__constexpr_memchr(__first, __value, __last - __first))
return __ret;
return __last;
@@ -69,7 +68,7 @@ template <class _Tp,
__enable_if_t<__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
sizeof(_Tp) == sizeof(wchar_t) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t),
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
if (auto __ret = std::__constexpr_wmemchr(__first, __value, __last - __first))
return __ret;
return __last;
@@ -85,8 +84,7 @@ template <class _Tp,
is_integral<_Tp>::value && is_integral<_Up>::value &&
is_signed<_Tp>::value == is_signed<_Up>::value,
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
-__find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) {
if (__value < numeric_limits<_Tp>::min() || __value > numeric_limits<_Tp>::max())
return __last;
return std::__find(__first, __last, _Tp(__value), __proj);
@@ -94,7 +92,7 @@ __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) {
// __bit_iterator implementation
template <bool _ToFind, class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) {
using _It = __bit_iterator<_Cp, _IsConst>;
using __storage_type = typename _It::__storage_type;
@@ -130,7 +128,7 @@ __find_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
}
template <class _Cp, bool _IsConst, class _Tp, class _Proj, __enable_if_t<__is_identity<_Proj>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, _IsConst>
+inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
if (static_cast<bool>(__value))
return std::__find_bool<true>(__first, static_cast<typename _Cp::size_type>(__last - __first));
@@ -146,7 +144,7 @@ template <class _SegmentedIterator,
class _Tp,
class _Proj,
__enable_if_t<__is_segmented_iterator<_SegmentedIterator>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _SegmentedIterator
+_LIBCPP_HIDE_FROM_ABI _SegmentedIterator
__find(_SegmentedIterator __first, _SegmentedIterator __last, const _Tp& __value, _Proj& __proj) {
return std::__find_segment_if(std::move(__first), std::move(__last), __find_segment<_Tp>(__value), __proj);
}
@@ -155,18 +153,17 @@ template <class _Tp>
struct __find_segment {
const _Tp& __value_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __find_segment(const _Tp& __value) : __value_(__value) {}
+ _LIBCPP_HIDE_FROM_ABI __find_segment(const _Tp& __value) : __value_(__value) {}
template <class _InputIterator, class _Proj>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _InputIterator
- operator()(_InputIterator __first, _InputIterator __last, _Proj& __proj) const {
+ _LIBCPP_HIDE_FROM_ABI _InputIterator operator()(_InputIterator __first, _InputIterator __last, _Proj& __proj) const {
return std::__find(__first, __last, __value_, __proj);
}
};
// public API
template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _InputIterator
find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
__identity __proj;
return std::__rewrap_iter(
diff --git a/libcxx/include/__cxx03/__algorithm/find_end.h b/libcxx/include/__cxx03/__algorithm/find_end.h
index 5feececb0adfb..8045021d5a526 100644
--- a/libcxx/include/__cxx03/__algorithm/find_end.h
+++ b/libcxx/include/__cxx03/__algorithm/find_end.h
@@ -36,7 +36,7 @@ template < class _AlgPolicy,
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __find_end_impl(
+_LIBCPP_HIDE_FROM_ABI inline pair<_Iter1, _Iter1> __find_end_impl(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -88,7 +88,7 @@ template < class _IterOps,
class _Sent2,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter1 __find_end(
+_LIBCPP_HIDE_FROM_ABI _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
@@ -139,7 +139,7 @@ template < class _AlgPolicy,
class _Sent2,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter1 __find_end(
+_LIBCPP_HIDE_FROM_ABI _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
@@ -184,7 +184,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter1 __find_end(
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_end_classic(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1 __find_end_classic(
_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
@@ -205,7 +205,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Fo
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_end(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1 find_end(
_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
@@ -215,7 +215,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Fo
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1
find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
return std::find_end(__first1, __last1, __first2, __last2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/find_first_of.h b/libcxx/include/__cxx03/__algorithm/find_first_of.h
index b1b3e5f3be01e..dd61fb4868f6c 100644
--- a/libcxx/include/__cxx03/__algorithm/find_first_of.h
+++ b/libcxx/include/__cxx03/__algorithm/find_first_of.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_first_of_ce(
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator1 __find_first_of_ce(
_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
@@ -35,7 +35,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_fir
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1 find_first_of(
_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
@@ -45,7 +45,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Fo
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1 find_first_of(
_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/find_if.h b/libcxx/include/__cxx03/__algorithm/find_if.h
index ca4139c86787c..e7cb971f1518f 100644
--- a/libcxx/include/__cxx03/__algorithm/find_if.h
+++ b/libcxx/include/__cxx03/__algorithm/find_if.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _InputIterator
find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/find_if_not.h b/libcxx/include/__cxx03/__algorithm/find_if_not.h
index a662dfbddfbb9..d3a6d7b44f967 100644
--- a/libcxx/include/__cxx03/__algorithm/find_if_not.h
+++ b/libcxx/include/__cxx03/__algorithm/find_if_not.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _InputIterator
find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/find_segment_if.h b/libcxx/include/__cxx03/__algorithm/find_segment_if.h
index 3475e9e8bdacd..9fdf8ae53d517 100644
--- a/libcxx/include/__cxx03/__algorithm/find_segment_if.h
+++ b/libcxx/include/__cxx03/__algorithm/find_segment_if.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// ranges algorithms, or __identity for classic algorithms.
template <class _SegmentedIterator, class _Pred, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _SegmentedIterator
+_LIBCPP_HIDE_FROM_ABI _SegmentedIterator
__find_segment_if(_SegmentedIterator __first, _SegmentedIterator __last, _Pred __pred, _Proj& __proj) {
using _Traits = __segmented_iterator_traits<_SegmentedIterator>;
diff --git a/libcxx/include/__cxx03/__algorithm/for_each.h b/libcxx/include/__cxx03/__algorithm/for_each.h
index f79eb434465cf..d160a9eddc50b 100644
--- a/libcxx/include/__cxx03/__algorithm/for_each.h
+++ b/libcxx/include/__cxx03/__algorithm/for_each.h
@@ -26,8 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Function>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Function
-for_each(_InputIterator __first, _InputIterator __last, _Function __f) {
+_LIBCPP_HIDE_FROM_ABI _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) {
for (; __first != __last; ++__first)
__f(*__first);
return __f;
diff --git a/libcxx/include/__cxx03/__algorithm/for_each_segment.h b/libcxx/include/__cxx03/__algorithm/for_each_segment.h
index 02b4a1799d6a8..b1d54ad427659 100644
--- a/libcxx/include/__cxx03/__algorithm/for_each_segment.h
+++ b/libcxx/include/__cxx03/__algorithm/for_each_segment.h
@@ -23,8 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// Anything that is returned from __func is ignored.
template <class _SegmentedIterator, class _Functor>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
-__for_each_segment(_SegmentedIterator __first, _SegmentedIterator __last, _Functor __func) {
+_LIBCPP_HIDE_FROM_ABI void __for_each_segment(_SegmentedIterator __first, _SegmentedIterator __last, _Functor __func) {
using _Traits = __segmented_iterator_traits<_SegmentedIterator>;
auto __sfirst = _Traits::__segment(__first);
diff --git a/libcxx/include/__cxx03/__algorithm/generate.h b/libcxx/include/__cxx03/__algorithm/generate.h
index fa1929b639ad1..2d98820a8c738 100644
--- a/libcxx/include/__cxx03/__algorithm/generate.h
+++ b/libcxx/include/__cxx03/__algorithm/generate.h
@@ -18,8 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Generator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) {
+inline _LIBCPP_HIDE_FROM_ABI void generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) {
for (; __first != __last; ++__first)
*__first = __gen();
}
diff --git a/libcxx/include/__cxx03/__algorithm/generate_n.h b/libcxx/include/__cxx03/__algorithm/generate_n.h
index 5a421131070e9..f1ea183ba7d68 100644
--- a/libcxx/include/__cxx03/__algorithm/generate_n.h
+++ b/libcxx/include/__cxx03/__algorithm/generate_n.h
@@ -19,8 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _OutputIterator, class _Size, class _Generator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen) {
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
for (; __n > 0; ++__first, (void)--__n)
diff --git a/libcxx/include/__cxx03/__algorithm/half_positive.h b/libcxx/include/__cxx03/__algorithm/half_positive.h
index a436a6086b5e9..6e01fce6fa240 100644
--- a/libcxx/include/__cxx03/__algorithm/half_positive.h
+++ b/libcxx/include/__cxx03/__algorithm/half_positive.h
@@ -23,12 +23,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// Perform division by two quickly for positive integers (llvm.org/PR39129)
template <typename _Integral, __enable_if_t<is_integral<_Integral>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Integral __half_positive(_Integral __value) {
+_LIBCPP_HIDE_FROM_ABI _Integral __half_positive(_Integral __value) {
return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2);
}
template <typename _Tp, __enable_if_t<!is_integral<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp __half_positive(_Tp __value) {
+_LIBCPP_HIDE_FROM_ABI _Tp __half_positive(_Tp __value) {
return __value / 2;
}
diff --git a/libcxx/include/__cxx03/__algorithm/includes.h b/libcxx/include/__cxx03/__algorithm/includes.h
index 725940b5acb74..194f508932272 100644
--- a/libcxx/include/__cxx03/__algorithm/includes.h
+++ b/libcxx/include/__cxx03/__algorithm/includes.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __includes(
+_LIBCPP_HIDE_FROM_ABI bool __includes(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -47,7 +47,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __includes(
}
template <class _InputIterator1, class _InputIterator2, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
includes(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -67,7 +67,7 @@ includes(_InputIterator1 __first1,
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
return std::includes(std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/is_heap.h b/libcxx/include/__cxx03/__algorithm/is_heap.h
index c19adb84ba570..a29cefe376409 100644
--- a/libcxx/include/__cxx03/__algorithm/is_heap.h
+++ b/libcxx/include/__cxx03/__algorithm/is_heap.h
@@ -22,13 +22,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RandomAccessIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp)) == __last;
}
template <class _RandomAccessIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
return std::is_heap(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/is_heap_until.h b/libcxx/include/__cxx03/__algorithm/is_heap_until.h
index e3a6d9769fcc5..6625af701c5c3 100644
--- a/libcxx/include/__cxx03/__algorithm/is_heap_until.h
+++ b/libcxx/include/__cxx03/__algorithm/is_heap_until.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
__is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __len = __last - __first;
@@ -46,13 +46,13 @@ __is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
}
template <class _RandomAccessIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp));
}
template <class _RandomAccessIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) {
return std::__is_heap_until(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/is_partitioned.h b/libcxx/include/__cxx03/__algorithm/is_partitioned.h
index a7dff7bf42544..c4547d3aa2ffa 100644
--- a/libcxx/include/__cxx03/__algorithm/is_partitioned.h
+++ b/libcxx/include/__cxx03/__algorithm/is_partitioned.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/is_permutation.h b/libcxx/include/__cxx03/__algorithm/is_permutation.h
index 3089acf119845..9402fdf5ce1c3 100644
--- a/libcxx/include/__cxx03/__algorithm/is_permutation.h
+++ b/libcxx/include/__cxx03/__algorithm/is_permutation.h
@@ -54,7 +54,7 @@ template <class _AlgPolicy,
class _Proj1,
class _Proj2,
class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation_impl(
+_LIBCPP_HIDE_FROM_ABI bool __is_permutation_impl(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -98,7 +98,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation_impl(
// 2+1 iterators, predicate. Not used by range algorithms.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool __is_permutation(
_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _BinaryPredicate&& __pred) {
// Shorten sequences as much as possible by lopping of any equal prefix.
for (; __first1 != __last1; ++__first1, (void)++__first2) {
@@ -135,7 +135,7 @@ template <class _AlgPolicy,
class _Proj1,
class _Proj2,
class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
+_LIBCPP_HIDE_FROM_ABI bool __is_permutation(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -178,7 +178,7 @@ template <class _AlgPolicy,
class _Proj1,
class _Proj2,
class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
+_LIBCPP_HIDE_FROM_ABI bool __is_permutation(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -209,7 +209,7 @@ template <class _AlgPolicy,
class _Proj1,
class _Proj2,
class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
+_LIBCPP_HIDE_FROM_ABI bool __is_permutation(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -232,7 +232,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
// 2+1 iterators, predicate
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool is_permutation(
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool is_permutation(
_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) {
static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
"The predicate has to be callable");
@@ -242,7 +242,7 @@ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool is_pe
// 2+1 iterators
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
return std::is_permutation(__first1, __last1, __first2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/is_sorted.h b/libcxx/include/__cxx03/__algorithm/is_sorted.h
index 1318f5baf8394..262b963f58f6b 100644
--- a/libcxx/include/__cxx03/__algorithm/is_sorted.h
+++ b/libcxx/include/__cxx03/__algorithm/is_sorted.h
@@ -22,14 +22,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
-is_sorted(_ForwardIterator __first, _ForwardIterator __last) {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) {
return std::is_sorted(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/is_sorted_until.h b/libcxx/include/__cxx03/__algorithm/is_sorted_until.h
index f97fb7c2e53ef..9bd3998e1ed78 100644
--- a/libcxx/include/__cxx03/__algorithm/is_sorted_until.h
+++ b/libcxx/include/__cxx03/__algorithm/is_sorted_until.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
if (__first != __last) {
_ForwardIterator __i = __first;
@@ -35,13 +35,13 @@ __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) {
return std::is_sorted_until(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/iter_swap.h b/libcxx/include/__cxx03/__algorithm/iter_swap.h
index 4fcbcdcf1e050..896a277c6af27 100644
--- a/libcxx/include/__cxx03/__algorithm/iter_swap.h
+++ b/libcxx/include/__cxx03/__algorithm/iter_swap.h
@@ -20,9 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
- // _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b)))
- _NOEXCEPT_(_NOEXCEPT_(swap(*std::declval<_ForwardIterator1>(), *std::declval<_ForwardIterator2>()))) {
+inline _LIBCPP_HIDE_FROM_ABI void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) {
swap(*__a, *__b);
}
diff --git a/libcxx/include/__cxx03/__algorithm/iterator_operations.h b/libcxx/include/__cxx03/__algorithm/iterator_operations.h
index c594723e7d906..b824928ee8fd8 100644
--- a/libcxx/include/__cxx03/__algorithm/iterator_operations.h
+++ b/libcxx/include/__cxx03/__algorithm/iterator_operations.h
@@ -52,14 +52,13 @@ struct _IterOps<_ClassicAlgPolicy> {
// advance
template <class _Iter, class _Distance>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void advance(_Iter& __iter, _Distance __count) {
+ _LIBCPP_HIDE_FROM_ABI static void advance(_Iter& __iter, _Distance __count) {
std::advance(__iter, __count);
}
// distance
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static typename iterator_traits<_Iter>::difference_type
- distance(_Iter __first, _Iter __last) {
+ _LIBCPP_HIDE_FROM_ABI static typename iterator_traits<_Iter>::difference_type distance(_Iter __first, _Iter __last) {
return std::distance(__first, __last);
}
@@ -70,7 +69,7 @@ struct _IterOps<_ClassicAlgPolicy> {
using __move_t = decltype(std::move(*std::declval<_Iter&>()));
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void __validate_iter_reference() {
+ _LIBCPP_HIDE_FROM_ABI static void __validate_iter_reference() {
static_assert(
is_same<__deref_t<_Iter>, typename iterator_traits<__remove_cvref_t<_Iter> >::reference>::value,
"It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of "
@@ -80,7 +79,7 @@ struct _IterOps<_ClassicAlgPolicy> {
// iter_move
template <class _Iter, __enable_if_t<is_reference<__deref_t<_Iter> >::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
+ _LIBCPP_HIDE_FROM_ABI static
// If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it.
// Note that the C++03 mode doesn't support `decltype(auto)` as the return type.
__move_t<_Iter>
@@ -91,7 +90,7 @@ struct _IterOps<_ClassicAlgPolicy> {
}
template <class _Iter, __enable_if_t<!is_reference<__deref_t<_Iter> >::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
+ _LIBCPP_HIDE_FROM_ABI static
// If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a
// value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to
// that temporary. Note that the C++03 mode doesn't support `auto` as the return type.
@@ -104,37 +103,37 @@ struct _IterOps<_ClassicAlgPolicy> {
// iter_swap
template <class _Iter1, class _Iter2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
+ _LIBCPP_HIDE_FROM_ABI static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b));
}
// next
template <class _Iterator>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator next(_Iterator, _Iterator __last) {
+ _LIBCPP_HIDE_FROM_ABI static _Iterator next(_Iterator, _Iterator __last) {
return __last;
}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 __remove_cvref_t<_Iter>
+ _LIBCPP_HIDE_FROM_ABI static __remove_cvref_t<_Iter>
next(_Iter&& __it, typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
return std::next(std::forward<_Iter>(__it), __n);
}
// prev
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 __remove_cvref_t<_Iter>
+ _LIBCPP_HIDE_FROM_ABI static __remove_cvref_t<_Iter>
prev(_Iter&& __iter, typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
return std::prev(std::forward<_Iter>(__iter), __n);
}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 void __advance_to(_Iter& __first, _Iter __last) {
+ _LIBCPP_HIDE_FROM_ABI static void __advance_to(_Iter& __first, _Iter __last) {
__first = __last;
}
// advance with sentinel, a la std::ranges::advance
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type<_Iter>
+ _LIBCPP_HIDE_FROM_ABI static __difference_type<_Iter>
__advance_to(_Iter& __iter, __difference_type<_Iter> __count, const _Iter& __sentinel) {
return _IterOps::__advance_to(__iter, __count, __sentinel, typename iterator_traits<_Iter>::iterator_category());
}
@@ -142,7 +141,7 @@ struct _IterOps<_ClassicAlgPolicy> {
private:
// advance with sentinel, a la std::ranges::advance -- InputIterator specialization
template <class _InputIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type<_InputIter> __advance_to(
+ _LIBCPP_HIDE_FROM_ABI static __difference_type<_InputIter> __advance_to(
_InputIter& __iter, __difference_type<_InputIter> __count, const _InputIter& __sentinel, input_iterator_tag) {
__difference_type<_InputIter> __dist = 0;
for (; __dist < __count && __iter != __sentinel; ++__dist)
@@ -152,7 +151,7 @@ struct _IterOps<_ClassicAlgPolicy> {
// advance with sentinel, a la std::ranges::advance -- BidirectionalIterator specialization
template <class _BiDirIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type<_BiDirIter>
+ _LIBCPP_HIDE_FROM_ABI static __difference_type<_BiDirIter>
__advance_to(_BiDirIter& __iter,
__difference_type<_BiDirIter> __count,
const _BiDirIter& __sentinel,
@@ -169,7 +168,7 @@ struct _IterOps<_ClassicAlgPolicy> {
// advance with sentinel, a la std::ranges::advance -- RandomIterator specialization
template <class _RandIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type<_RandIter>
+ _LIBCPP_HIDE_FROM_ABI static __difference_type<_RandIter>
__advance_to(_RandIter& __iter,
__difference_type<_RandIter> __count,
const _RandIter& __sentinel,
diff --git a/libcxx/include/__cxx03/__algorithm/lexicographical_compare.h b/libcxx/include/__cxx03/__algorithm/lexicographical_compare.h
index b019e4b5021b4..0d991c99a3317 100644
--- a/libcxx/include/__cxx03/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__cxx03/__algorithm/lexicographical_compare.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __lexicographical_compare(
+_LIBCPP_HIDE_FROM_ABI bool __lexicographical_compare(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -37,7 +37,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __lexicographical_compa
}
template <class _InputIterator1, class _InputIterator2, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool lexicographical_compare(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool lexicographical_compare(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -47,7 +47,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 boo
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool lexicographical_compare(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool lexicographical_compare(
_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/lower_bound.h b/libcxx/include/__cxx03/__algorithm/lower_bound.h
index a0d728009b7ff..47ae2550a6bbd 100644
--- a/libcxx/include/__cxx03/__algorithm/lower_bound.h
+++ b/libcxx/include/__cxx03/__algorithm/lower_bound.h
@@ -28,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Iter, class _Type, class _Proj, class _Comp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter __lower_bound_bisecting(
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Iter __lower_bound_bisecting(
_Iter __first,
const _Type& __value,
typename iterator_traits<_Iter>::difference_type __len,
@@ -58,7 +58,7 @@ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter __lo
// whereas the one-sided version will yield O(n) operations on both counts, with a \Omega(log(n)) bound on the number of
// comparisons.
template <class _AlgPolicy, class _ForwardIterator, class _Sent, class _Type, class _Proj, class _Comp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _ForwardIterator
__lower_bound_onesided(_ForwardIterator __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
// step = 0, ensuring we can always short-circuit when distance is 1 later on
if (__first == __last || !std::__invoke(__comp, std::__invoke(__proj, *__first), __value))
@@ -84,14 +84,14 @@ __lower_bound_onesided(_ForwardIterator __first, _Sent __last, const _Type& __va
}
template <class _AlgPolicy, class _ForwardIterator, class _Sent, class _Type, class _Proj, class _Comp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
__lower_bound(_ForwardIterator __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
const auto __dist = _IterOps<_AlgPolicy>::distance(__first, __last);
return std::__lower_bound_bisecting<_AlgPolicy>(__first, __value, __dist, __comp, __proj);
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
auto __proj = std::__identity();
@@ -99,7 +99,7 @@ lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::lower_bound(__first, __last, __value, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/make_heap.h b/libcxx/include/__cxx03/__algorithm/make_heap.h
index 35a7f7bf9779f..faa7e9e185a5e 100644
--- a/libcxx/include/__cxx03/__algorithm/make_heap.h
+++ b/libcxx/include/__cxx03/__algorithm/make_heap.h
@@ -27,7 +27,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+inline _LIBCPP_HIDE_FROM_ABI void
__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
__comp_ref_type<_Compare> __comp_ref = __comp;
@@ -42,14 +42,13 @@ __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
std::__make_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::make_heap(std::move(__first), std::move(__last), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/make_projected.h b/libcxx/include/__cxx03/__algorithm/make_projected.h
index 68cda60d4e473..592f6d6a5d7e1 100644
--- a/libcxx/include/__cxx03/__algorithm/make_projected.h
+++ b/libcxx/include/__cxx03/__algorithm/make_projected.h
@@ -31,12 +31,11 @@ struct _ProjectedPred {
_Pred& __pred; // Can be a unary or a binary predicate.
_Proj& __proj;
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg)
- : __pred(__pred_arg), __proj(__proj_arg) {}
+ _LIBCPP_HIDE_FROM_ABI _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg) : __pred(__pred_arg), __proj(__proj_arg) {}
template <class _Tp>
typename __invoke_of<_Pred&, decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>()))>::type
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
operator()(_Tp&& __v) const {
return std::__invoke(__pred, std::__invoke(__proj, std::forward<_Tp>(__v)));
}
@@ -44,8 +43,7 @@ struct _ProjectedPred {
template <class _T1, class _T2>
typename __invoke_of<_Pred&,
decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T1>())),
- decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T2>()))>::type _LIBCPP_CONSTEXPR
- _LIBCPP_HIDE_FROM_ABI
+ decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T2>()))>::type _LIBCPP_HIDE_FROM_ABI
operator()(_T1&& __lhs, _T2&& __rhs) const {
return std::__invoke(
__pred, std::__invoke(__proj, std::forward<_T1>(__lhs)), std::__invoke(__proj, std::forward<_T2>(__rhs)));
@@ -56,7 +54,7 @@ template <
class _Pred,
class _Proj,
__enable_if_t<!(!is_member_pointer<__decay_t<_Pred> >::value && __is_identity<__decay_t<_Proj> >::value), int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ProjectedPred<_Pred, _Proj> __make_projected(_Pred& __pred, _Proj& __proj) {
+_LIBCPP_HIDE_FROM_ABI _ProjectedPred<_Pred, _Proj> __make_projected(_Pred& __pred, _Proj& __proj) {
return _ProjectedPred<_Pred, _Proj>(__pred, __proj);
}
@@ -67,7 +65,7 @@ template <
class _Pred,
class _Proj,
__enable_if_t<!is_member_pointer<__decay_t<_Pred> >::value && __is_identity<__decay_t<_Proj> >::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Pred& __make_projected(_Pred& __pred, _Proj&) {
+_LIBCPP_HIDE_FROM_ABI _Pred& __make_projected(_Pred& __pred, _Proj&) {
return __pred;
}
diff --git a/libcxx/include/__cxx03/__algorithm/max.h b/libcxx/include/__cxx03/__algorithm/max.h
index 50dfd03843bdd..0a2e435b6cdc1 100644
--- a/libcxx/include/__cxx03/__algorithm/max.h
+++ b/libcxx/include/__cxx03/__algorithm/max.h
@@ -24,13 +24,13 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI const _Tp&
max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp) {
return __comp(__a, __b) ? __b : __a;
}
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI const _Tp&
max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b) {
return std::max(__a, __b, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/max_element.h b/libcxx/include/__cxx03/__algorithm/max_element.h
index 20a22e74c8be7..710df45d3a14d 100644
--- a/libcxx/include/__cxx03/__algorithm/max_element.h
+++ b/libcxx/include/__cxx03/__algorithm/max_element.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "std::max_element requires a ForwardIterator");
@@ -35,13 +35,13 @@ __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last) {
return std::max_element(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/merge.h b/libcxx/include/__cxx03/__algorithm/merge.h
index 90b986f747a3c..b5a19a836554a 100644
--- a/libcxx/include/__cxx03/__algorithm/merge.h
+++ b/libcxx/include/__cxx03/__algorithm/merge.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator __merge(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator __merge(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -44,7 +44,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator __merge(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
merge(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -55,7 +55,7 @@ merge(_InputIterator1 __first1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
merge(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/min.h b/libcxx/include/__cxx03/__algorithm/min.h
index b617f857102d4..f42e47b644c9a 100644
--- a/libcxx/include/__cxx03/__algorithm/min.h
+++ b/libcxx/include/__cxx03/__algorithm/min.h
@@ -24,13 +24,13 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI const _Tp&
min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp) {
return __comp(__b, __a) ? __b : __a;
}
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI const _Tp&
min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b) {
return std::min(__a, __b, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/min_element.h b/libcxx/include/__cxx03/__algorithm/min_element.h
index 11c059c3acdc2..41c04162a61f3 100644
--- a/libcxx/include/__cxx03/__algorithm/min_element.h
+++ b/libcxx/include/__cxx03/__algorithm/min_element.h
@@ -28,8 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Comp, class _Iter, class _Sent, class _Proj>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter
-__min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
+inline _LIBCPP_HIDE_FROM_ABI _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
if (__first == __last)
return __first;
@@ -42,13 +41,13 @@ __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
}
template <class _Comp, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
+_LIBCPP_HIDE_FROM_ABI _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
auto __proj = __identity();
return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj);
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "std::min_element requires a ForwardIterator");
@@ -59,7 +58,7 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last) {
return std::min_element(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/minmax.h b/libcxx/include/__cxx03/__algorithm/minmax.h
index 609bc623b913c..ce19486ff58a7 100644
--- a/libcxx/include/__cxx03/__algorithm/minmax.h
+++ b/libcxx/include/__cxx03/__algorithm/minmax.h
@@ -23,13 +23,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<const _Tp&, const _Tp&>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI pair<const _Tp&, const _Tp&>
minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp) {
return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) : pair<const _Tp&, const _Tp&>(__a, __b);
}
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<const _Tp&, const _Tp&>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI pair<const _Tp&, const _Tp&>
minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b) {
return std::minmax(__a, __b, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/minmax_element.h b/libcxx/include/__cxx03/__algorithm/minmax_element.h
index c400ec2e8c7d5..8451725769e49 100644
--- a/libcxx/include/__cxx03/__algorithm/minmax_element.h
+++ b/libcxx/include/__cxx03/__algorithm/minmax_element.h
@@ -29,17 +29,16 @@ class _MinmaxElementLessFunc {
_Proj& __proj_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj)
- : __comp_(__comp), __proj_(__proj) {}
+ _LIBCPP_HIDE_FROM_ABI _MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(_Iter& __it1, _Iter& __it2) {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(_Iter& __it1, _Iter& __it2) {
return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2));
}
};
template <class _Iter, class _Sent, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter>
+_LIBCPP_HIDE_FROM_ABI pair<_Iter, _Iter>
__minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
auto __less = _MinmaxElementLessFunc<_Comp, _Proj>(__comp, __proj);
@@ -79,7 +78,7 @@ __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj)
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "std::minmax_element requires a ForwardIterator");
@@ -90,7 +89,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
return std::minmax_element(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/mismatch.h b/libcxx/include/__cxx03/__algorithm/mismatch.h
index baf464c25e86f..3c57c1bab1d61 100644
--- a/libcxx/include/__cxx03/__algorithm/mismatch.h
+++ b/libcxx/include/__cxx03/__algorithm/mismatch.h
@@ -37,7 +37,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter1, class _Sent1, class _Iter2, class _Pred, class _Proj1, class _Proj2>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter1, _Iter2>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter2>
__mismatch_loop(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
while (__first1 != __last1) {
if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
@@ -49,7 +49,7 @@ __mismatch_loop(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred,
}
template <class _Iter1, class _Sent1, class _Iter2, class _Pred, class _Proj1, class _Proj2>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter1, _Iter2>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter2>
__mismatch(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
return std::__mismatch_loop(__first1, __last1, __first2, __pred, __proj1, __proj2);
}
@@ -57,7 +57,7 @@ __mismatch(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Pro
#if _LIBCPP_VECTORIZE_ALGORITHMS
template <class _Iter>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter, _Iter>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_Iter, _Iter>
__mismatch_vectorized(_Iter __first1, _Iter __last1, _Iter __first2) {
using __value_type = __iter_value_type<_Iter>;
constexpr size_t __unroll_count = 4;
@@ -124,7 +124,7 @@ template <class _Tp,
__enable_if_t<is_integral<_Tp>::value && __desugars_to_v<__equal_tag, _Pred, _Tp, _Tp> &&
__is_identity<_Proj1>::value && __is_identity<_Proj2>::value,
int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Tp*, _Tp*>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_Tp*, _Tp*>
__mismatch(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Pred&, _Proj1&, _Proj2&) {
return std::__mismatch_vectorized(__first1, __last1, __first2);
}
@@ -137,7 +137,7 @@ template <class _Tp,
__is_identity<_Proj1>::value && __is_identity<_Proj2>::value &&
__can_map_to_integer_v<_Tp> && __libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Tp*, _Tp*>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI pair<_Tp*, _Tp*>
__mismatch(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
if (__libcpp_is_constant_evaluated()) {
return std::__mismatch_loop(__first1, __last1, __first2, __pred, __proj1, __proj2);
@@ -150,7 +150,7 @@ __mismatch(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Pred& __pred, _Proj1& __
#endif // _LIBCPP_VECTORIZE_ALGORITHMS
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
__identity __proj;
auto __res = std::__mismatch(
@@ -159,7 +159,7 @@ mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
return std::mismatch(__first1, __last1, __first2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/move.h b/libcxx/include/__cxx03/__algorithm/move.h
index cb158e15f19f5..0c744bc0e91a4 100644
--- a/libcxx/include/__cxx03/__algorithm/move.h
+++ b/libcxx/include/__cxx03/__algorithm/move.h
@@ -30,14 +30,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-__move(_InIter __first, _Sent __last, _OutIter __result);
+inline _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __move(_InIter __first, _Sent __last, _OutIter __result);
template <class _AlgPolicy>
struct __move_impl {
template <class _InIter, class _Sent, class _OutIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _Sent __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
while (__first != __last) {
*__result = _IterOps<_AlgPolicy>::__iter_move(__first);
++__first;
@@ -52,18 +50,16 @@ struct __move_impl {
_OutIter& __result_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit _MoveSegment(_OutIter& __result)
- : __result_(__result) {}
+ _LIBCPP_HIDE_FROM_ABI explicit _MoveSegment(_OutIter& __result) : __result_(__result) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+ _LIBCPP_HIDE_FROM_ABI void
operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
__result_ = std::__move<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
}
};
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
std::__for_each_segment(__first, __last, _MoveSegment<_InIter, _OutIter>(__result));
return std::make_pair(__last, std::move(__result));
}
@@ -73,8 +69,7 @@ struct __move_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
using _DiffT = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
@@ -98,21 +93,19 @@ struct __move_impl {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_move_assignment_to_memmove<_In, _Out>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_trivial_impl(__first, __last, __result);
}
};
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-__move(_InIter __first, _Sent __last, _OutIter __result) {
+inline _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __move(_InIter __first, _Sent __last, _OutIter __result) {
return std::__copy_move_unwrap_iters<__move_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
static_assert(is_copy_constructible<_InputIterator>::value, "Iterators has to be copy constructible.");
static_assert(is_copy_constructible<_OutputIterator>::value, "The output iterator has to be copy constructible.");
diff --git a/libcxx/include/__cxx03/__algorithm/move_backward.h b/libcxx/include/__cxx03/__algorithm/move_backward.h
index d4da82382a4c7..61e29c5c396f1 100644
--- a/libcxx/include/__cxx03/__algorithm/move_backward.h
+++ b/libcxx/include/__cxx03/__algorithm/move_backward.h
@@ -29,14 +29,13 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator1, _BidirectionalIterator2>
__move_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result);
template <class _AlgPolicy>
struct __move_backward_impl {
template <class _InIter, class _Sent, class _OutIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _Sent __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
auto __last_iter = _IterOps<_AlgPolicy>::next(__first, __last);
auto __original_last_iter = __last_iter;
@@ -48,8 +47,7 @@ struct __move_backward_impl {
}
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_InIter>;
auto __sfirst = _Traits::__segment(__first);
auto __slast = _Traits::__segment(__last);
@@ -79,8 +77,7 @@ struct __move_backward_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
using _DiffT = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
@@ -107,14 +104,13 @@ struct __move_backward_impl {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_move_assignment_to_memmove<_In, _Out>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_backward_trivial_impl(__first, __last, __result);
}
};
template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator1, _BidirectionalIterator2>
__move_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
static_assert(std::is_copy_constructible<_BidirectionalIterator1>::value &&
std::is_copy_constructible<_BidirectionalIterator1>::value,
@@ -125,7 +121,7 @@ __move_backward(_BidirectionalIterator1 __first, _Sentinel __last, _Bidirectiona
}
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
+inline _LIBCPP_HIDE_FROM_ABI _BidirectionalIterator2
move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
return std::__move_backward<_ClassicAlgPolicy>(std::move(__first), std::move(__last), std::move(__result)).second;
}
diff --git a/libcxx/include/__cxx03/__algorithm/next_permutation.h b/libcxx/include/__cxx03/__algorithm/next_permutation.h
index 7d6b2ddad5056..12c6c51cb4dcb 100644
--- a/libcxx/include/__cxx03/__algorithm/next_permutation.h
+++ b/libcxx/include/__cxx03/__algorithm/next_permutation.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, bool>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator, bool>
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp) {
using _Result = pair<_BidirectionalIterator, bool>;
@@ -55,7 +55,7 @@ __next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
}
template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
return std::__next_permutation<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp))
@@ -63,8 +63,7 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
}
template <class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
-next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) {
return std::next_permutation(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/none_of.h b/libcxx/include/__cxx03/__algorithm/none_of.h
index 91162ec24ab1d..6672d5c0b2b11 100644
--- a/libcxx/include/__cxx03/__algorithm/none_of.h
+++ b/libcxx/include/__cxx03/__algorithm/none_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/nth_element.h b/libcxx/include/__cxx03/__algorithm/nth_element.h
index 232966e0d2670..e39540fc985f7 100644
--- a/libcxx/include/__cxx03/__algorithm/nth_element.h
+++ b/libcxx/include/__cxx03/__algorithm/nth_element.h
@@ -29,7 +29,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool __nth_element_find_guard(
+_LIBCPP_HIDE_FROM_ABI bool __nth_element_find_guard(
_RandomAccessIterator& __i, _RandomAccessIterator& __j, _RandomAccessIterator __m, _Compare __comp) {
// manually guard downward moving __j against __i
while (true) {
@@ -43,7 +43,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool __nth_element_find_guar
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
// NOLINTNEXTLINE(readability-function-cognitive-complexity)
__nth_element(
_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) {
@@ -227,7 +227,7 @@ __nth_element(
}
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __nth_element_impl(
+inline _LIBCPP_HIDE_FROM_ABI void __nth_element_impl(
_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare& __comp) {
if (__nth == __last)
return;
@@ -243,13 +243,13 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __nth_element_im
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) {
std::__nth_element_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__nth), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) {
std::nth_element(std::move(__first), std::move(__nth), std::move(__last), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/partial_sort.h b/libcxx/include/__cxx03/__algorithm/partial_sort.h
index 04597fc32b9a2..56cb9e0132be0 100644
--- a/libcxx/include/__cxx03/__algorithm/partial_sort.h
+++ b/libcxx/include/__cxx03/__algorithm/partial_sort.h
@@ -32,7 +32,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator __partial_sort_impl(
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __partial_sort_impl(
_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
if (__first == __middle) {
return _IterOps<_AlgPolicy>::next(__middle, __last);
@@ -54,7 +54,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator __part
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
__partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare& __comp) {
if (__first == __middle)
return _IterOps<_AlgPolicy>::next(__middle, __last);
@@ -70,7 +70,7 @@ __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _S
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void partial_sort(
+inline _LIBCPP_HIDE_FROM_ABI void partial_sort(
_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -79,7 +79,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void partial_sort(
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) {
std::partial_sort(__first, __middle, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/partial_sort_copy.h b/libcxx/include/__cxx03/__algorithm/partial_sort_copy.h
index 41189cfe029df..e0846dcaac10f 100644
--- a/libcxx/include/__cxx03/__algorithm/partial_sort_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/partial_sort_copy.h
@@ -41,7 +41,7 @@ template <class _AlgPolicy,
class _Sentinel2,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _RandomAccessIterator> __partial_sort_copy(
+_LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _RandomAccessIterator> __partial_sort_copy(
_InputIterator __first,
_Sentinel1 __last,
_RandomAccessIterator __result_first,
@@ -70,7 +70,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _Random
}
template <class _InputIterator, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator partial_sort_copy(
+inline _LIBCPP_HIDE_FROM_ABI _RandomAccessIterator partial_sort_copy(
_InputIterator __first,
_InputIterator __last,
_RandomAccessIterator __result_first,
@@ -91,7 +91,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
}
template <class _InputIterator, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator partial_sort_copy(
+inline _LIBCPP_HIDE_FROM_ABI _RandomAccessIterator partial_sort_copy(
_InputIterator __first,
_InputIterator __last,
_RandomAccessIterator __result_first,
diff --git a/libcxx/include/__cxx03/__algorithm/partition.h b/libcxx/include/__cxx03/__algorithm/partition.h
index d39dbbbd0b185..47fe62f9732a4 100644
--- a/libcxx/include/__cxx03/__algorithm/partition.h
+++ b/libcxx/include/__cxx03/__algorithm/partition.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag) {
while (true) {
if (__first == __last)
@@ -46,7 +46,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
}
template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, _BidirectionalIterator>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator, _BidirectionalIterator>
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred, bidirectional_iterator_tag) {
_BidirectionalIterator __original_last = _IterOps<_AlgPolicy>::next(__first, __sentinel);
_BidirectionalIterator __last = __original_last;
@@ -69,14 +69,14 @@ __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicat
}
template <class _AlgPolicy, class _ForwardIterator, class _Sentinel, class _Predicate, class _IterCategory>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
+inline _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _ForwardIterator>
__partition(_ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) {
return std::__partition_impl<__remove_cvref_t<_Predicate>&, _AlgPolicy>(
std::move(__first), std::move(__last), __pred, __iter_category);
}
template <class _ForwardIterator, class _Predicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
using _IterCategory = typename iterator_traits<_ForwardIterator>::iterator_category;
auto __result = std::__partition<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred, _IterCategory());
diff --git a/libcxx/include/__cxx03/__algorithm/partition_copy.h b/libcxx/include/__cxx03/__algorithm/partition_copy.h
index 18d82cfa20326..3781233493346 100644
--- a/libcxx/include/__cxx03/__algorithm/partition_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/partition_copy.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator1, class _OutputIterator2, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_OutputIterator1, _OutputIterator2> partition_copy(
+_LIBCPP_HIDE_FROM_ABI pair<_OutputIterator1, _OutputIterator2> partition_copy(
_InputIterator __first,
_InputIterator __last,
_OutputIterator1 __out_true,
diff --git a/libcxx/include/__cxx03/__algorithm/partition_point.h b/libcxx/include/__cxx03/__algorithm/partition_point.h
index ccf203bbf245e..8dc6aea65b3c6 100644
--- a/libcxx/include/__cxx03/__algorithm/partition_point.h
+++ b/libcxx/include/__cxx03/__algorithm/partition_point.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
difference_type __len = std::distance(__first, __last);
diff --git a/libcxx/include/__cxx03/__algorithm/pop_heap.h b/libcxx/include/__cxx03/__algorithm/pop_heap.h
index 5d19e902ff13b..ed0d1f1cc56b4 100644
--- a/libcxx/include/__cxx03/__algorithm/pop_heap.h
+++ b/libcxx/include/__cxx03/__algorithm/pop_heap.h
@@ -31,7 +31,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+inline _LIBCPP_HIDE_FROM_ABI void
__pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Compare& __comp,
@@ -59,7 +59,7 @@ __pop_heap(_RandomAccessIterator __first,
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -69,8 +69,7 @@ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare _
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::pop_heap(std::move(__first), std::move(__last), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/prev_permutation.h b/libcxx/include/__cxx03/__algorithm/prev_permutation.h
index b050d9cf337a7..a617377a7630e 100644
--- a/libcxx/include/__cxx03/__algorithm/prev_permutation.h
+++ b/libcxx/include/__cxx03/__algorithm/prev_permutation.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, bool>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator, bool>
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp) {
using _Result = pair<_BidirectionalIterator, bool>;
@@ -55,7 +55,7 @@ __prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
}
template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
return std::__prev_permutation<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp))
@@ -63,8 +63,7 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
}
template <class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
-prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) {
return std::prev_permutation(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/push_heap.h b/libcxx/include/__cxx03/__algorithm/push_heap.h
index 9ef44cdb3feea..eb4dc36ba7691 100644
--- a/libcxx/include/__cxx03/__algorithm/push_heap.h
+++ b/libcxx/include/__cxx03/__algorithm/push_heap.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
__sift_up(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Compare&& __comp,
@@ -56,14 +56,14 @@ __sift_up(_RandomAccessIterator __first,
}
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+inline _LIBCPP_HIDE_FROM_ABI void
__push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first;
std::__sift_up<_AlgPolicy, __comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp, __len);
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -72,8 +72,7 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::push_heap(std::move(__first), std::move(__last), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/remove.h b/libcxx/include/__cxx03/__algorithm/remove.h
index 208351e22ac90..c5dc7aaf8e433 100644
--- a/libcxx/include/__cxx03/__algorithm/remove.h
+++ b/libcxx/include/__cxx03/__algorithm/remove.h
@@ -24,7 +24,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
__first = std::find(__first, __last, __value);
if (__first != __last) {
diff --git a/libcxx/include/__cxx03/__algorithm/remove_copy.h b/libcxx/include/__cxx03/__algorithm/remove_copy.h
index 1bed25224281b..7360f53ff1c61 100644
--- a/libcxx/include/__cxx03/__algorithm/remove_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/remove_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) {
for (; __first != __last; ++__first) {
if (!(*__first == __value)) {
diff --git a/libcxx/include/__cxx03/__algorithm/remove_copy_if.h b/libcxx/include/__cxx03/__algorithm/remove_copy_if.h
index 3ec019dfd5912..5993738414373 100644
--- a/libcxx/include/__cxx03/__algorithm/remove_copy_if.h
+++ b/libcxx/include/__cxx03/__algorithm/remove_copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) {
for (; __first != __last; ++__first) {
if (!__pred(*__first)) {
diff --git a/libcxx/include/__cxx03/__algorithm/remove_if.h b/libcxx/include/__cxx03/__algorithm/remove_if.h
index c64e0aa4477e5..c740f4527ae65 100644
--- a/libcxx/include/__cxx03/__algorithm/remove_if.h
+++ b/libcxx/include/__cxx03/__algorithm/remove_if.h
@@ -23,7 +23,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
__first = std::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
if (__first != __last) {
diff --git a/libcxx/include/__cxx03/__algorithm/replace.h b/libcxx/include/__cxx03/__algorithm/replace.h
index 692cece1708f9..975bc5f51c3c3 100644
--- a/libcxx/include/__cxx03/__algorithm/replace.h
+++ b/libcxx/include/__cxx03/__algorithm/replace.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value) {
for (; __first != __last; ++__first)
if (*__first == __old_value)
diff --git a/libcxx/include/__cxx03/__algorithm/replace_copy.h b/libcxx/include/__cxx03/__algorithm/replace_copy.h
index 4f8b375df2fb7..6e786c3126b8e 100644
--- a/libcxx/include/__cxx03/__algorithm/replace_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/replace_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator replace_copy(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator replace_copy(
_InputIterator __first,
_InputIterator __last,
_OutputIterator __result,
diff --git a/libcxx/include/__cxx03/__algorithm/replace_copy_if.h b/libcxx/include/__cxx03/__algorithm/replace_copy_if.h
index cfc7b0aa2d34c..43bbcc01fa49b 100644
--- a/libcxx/include/__cxx03/__algorithm/replace_copy_if.h
+++ b/libcxx/include/__cxx03/__algorithm/replace_copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator replace_copy_if(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator replace_copy_if(
_InputIterator __first,
_InputIterator __last,
_OutputIterator __result,
diff --git a/libcxx/include/__cxx03/__algorithm/replace_if.h b/libcxx/include/__cxx03/__algorithm/replace_if.h
index f46da35714ef3..5816b247f187e 100644
--- a/libcxx/include/__cxx03/__algorithm/replace_if.h
+++ b/libcxx/include/__cxx03/__algorithm/replace_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/reverse.h b/libcxx/include/__cxx03/__algorithm/reverse.h
index 868377c7b26bd..d5298fcc9b1dd 100644
--- a/libcxx/include/__cxx03/__algorithm/reverse.h
+++ b/libcxx/include/__cxx03/__algorithm/reverse.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
__reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag) {
while (__first != __last) {
if (__first == --__last)
@@ -36,7 +36,7 @@ __reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bi
}
template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
__reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) {
if (__first != __last)
for (; __first < --__last; ++__first)
@@ -44,14 +44,13 @@ __reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, rand
}
template <class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
+_LIBCPP_HIDE_FROM_ABI void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_BidirectionalIterator>;
std::__reverse_impl<_AlgPolicy>(std::move(__first), std::move(__last), _IterCategory());
}
template <class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) {
std::__reverse<_ClassicAlgPolicy>(std::move(__first), std::move(__last));
}
diff --git a/libcxx/include/__cxx03/__algorithm/reverse_copy.h b/libcxx/include/__cxx03/__algorithm/reverse_copy.h
index 3553102a2d03c..a667e8a8068e3 100644
--- a/libcxx/include/__cxx03/__algorithm/reverse_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/reverse_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _BidirectionalIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) {
for (; __first != __last; ++__result)
*__result = *--__last;
diff --git a/libcxx/include/__cxx03/__algorithm/rotate.h b/libcxx/include/__cxx03/__algorithm/rotate.h
index e41edf00e7993..8e5c10acf42e5 100644
--- a/libcxx/include/__cxx03/__algorithm/rotate.h
+++ b/libcxx/include/__cxx03/__algorithm/rotate.h
@@ -29,8 +29,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
-__rotate_left(_ForwardIterator __first, _ForwardIterator __last) {
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator __rotate_left(_ForwardIterator __first, _ForwardIterator __last) {
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
using _Ops = _IterOps<_AlgPolicy>;
@@ -41,7 +40,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last) {
}
template <class _AlgPolicy, class _BidirectionalIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
+_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) {
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
using _Ops = _IterOps<_AlgPolicy>;
@@ -54,7 +53,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) {
}
template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) {
_ForwardIterator __i = __middle;
while (true) {
@@ -83,7 +82,7 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt
}
template <typename _Integral>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Integral __algo_gcd(_Integral __x, _Integral __y) {
+inline _LIBCPP_HIDE_FROM_ABI _Integral __algo_gcd(_Integral __x, _Integral __y) {
do {
_Integral __t = __x % __y;
__x = __y;
@@ -93,7 +92,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Integral __algo_gcd(
}
template <class _AlgPolicy, typename _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
@@ -125,7 +124,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
}
template <class _AlgPolicy, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, std::forward_iterator_tag) {
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
if (is_trivially_move_assignable<value_type>::value) {
@@ -136,7 +135,7 @@ __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardItera
}
template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator __rotate_impl(
+inline _LIBCPP_HIDE_FROM_ABI _BidirectionalIterator __rotate_impl(
_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
@@ -152,7 +151,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterato
}
template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator __rotate_impl(
+inline _LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __rotate_impl(
_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last,
@@ -169,8 +168,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
}
template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iterator, _Iterator>
-__rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
+_LIBCPP_HIDE_FROM_ABI pair<_Iterator, _Iterator> __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
using _Ret = pair<_Iterator, _Iterator>;
_Iterator __last_iter = _IterOps<_AlgPolicy>::next(__middle, __last);
@@ -186,7 +184,7 @@ __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
}
template <class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) {
return std::__rotate<_ClassicAlgPolicy>(std::move(__first), std::move(__middle), std::move(__last)).first;
}
diff --git a/libcxx/include/__cxx03/__algorithm/rotate_copy.h b/libcxx/include/__cxx03/__algorithm/rotate_copy.h
index 6970cdc5a2c56..06e1fb44bc6d1 100644
--- a/libcxx/include/__cxx03/__algorithm/rotate_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/rotate_copy.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) {
return std::copy(__first, __middle, std::copy(__middle, __last, __result));
}
diff --git a/libcxx/include/__cxx03/__algorithm/search.h b/libcxx/include/__cxx03/__algorithm/search.h
index f235510c33905..f3691de5de68b 100644
--- a/libcxx/include/__cxx03/__algorithm/search.h
+++ b/libcxx/include/__cxx03/__algorithm/search.h
@@ -35,7 +35,7 @@ template <class _AlgPolicy,
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_forward_impl(
+_LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter1> __search_forward_impl(
_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
if (__first2 == __last2)
return std::make_pair(__first1, __first1); // Everything matches an empty sequence
@@ -79,7 +79,7 @@ template <class _AlgPolicy,
class _Proj2,
class _DiffT1,
class _DiffT2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_random_access_impl(
+_LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter1> __search_random_access_impl(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -126,7 +126,7 @@ template <class _Iter1,
__enable_if_t<__has_random_access_iterator_category<_Iter1>::value &&
__has_random_access_iterator_category<_Iter2>::value,
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl(
+_LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter1> __search_impl(
_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
auto __size2 = __last2 - __first2;
if (__size2 == 0)
@@ -153,13 +153,13 @@ template <
!(__has_random_access_iterator_category<_Iter1>::value &&
__has_random_access_iterator_category<_Iter2>::value),
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl(
+_LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter1> __search_impl(
_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
return std::__search_forward_impl<_ClassicAlgPolicy>(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2);
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1
search(_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
@@ -172,7 +172,7 @@ search(_ForwardIterator1 __first1,
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator1
search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
return std::search(__first1, __last1, __first2, __last2, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/search_n.h b/libcxx/include/__cxx03/__algorithm/search_n.h
index 6fb5d52d4ff30..98328c69d3a70 100644
--- a/libcxx/include/__cxx03/__algorithm/search_n.h
+++ b/libcxx/include/__cxx03/__algorithm/search_n.h
@@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter> __search_n_forward_impl(
+_LIBCPP_HIDE_FROM_ABI pair<_Iter, _Iter> __search_n_forward_impl(
_Iter __first, _Sent __last, _SizeT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) {
if (__count <= 0)
return std::make_pair(__first, __first);
@@ -66,7 +66,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter> __search_
}
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj, class _DiffT>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 std::pair<_Iter, _Iter> __search_n_random_access_impl(
+_LIBCPP_HIDE_FROM_ABI std::pair<_Iter, _Iter> __search_n_random_access_impl(
_Iter __first, _Sent __last, _SizeT __count, const _Type& __value, _Pred& __pred, _Proj& __proj, _DiffT __size1) {
using difference_type = typename iterator_traits<_Iter>::difference_type;
if (__count == 0)
@@ -113,7 +113,7 @@ template <class _Iter,
class _Pred,
class _Proj,
__enable_if_t<__has_random_access_iterator_category<_Iter>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter>
+_LIBCPP_HIDE_FROM_ABI pair<_Iter, _Iter>
__search_n_impl(_Iter __first, _Sent __last, _DiffT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) {
return std::__search_n_random_access_impl<_ClassicAlgPolicy>(
__first, __last, __count, __value, __pred, __proj, __last - __first);
@@ -128,13 +128,13 @@ template <class _Iter1,
__enable_if_t<__has_forward_iterator_category<_Iter1>::value &&
!__has_random_access_iterator_category<_Iter1>::value,
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1>
+_LIBCPP_HIDE_FROM_ABI pair<_Iter1, _Iter1>
__search_n_impl(_Iter1 __first, _Sent1 __last, _DiffT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) {
return std::__search_n_forward_impl<_ClassicAlgPolicy>(__first, __last, __count, __value, __pred, __proj);
}
template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator search_n(
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator search_n(
_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value, _BinaryPredicate __pred) {
static_assert(
__is_callable<_BinaryPredicate, decltype(*__first), const _Tp&>::value, "BinaryPredicate has to be callable");
@@ -143,7 +143,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Fo
}
template <class _ForwardIterator, class _Size, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) {
return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/set_difference.h b/libcxx/include/__cxx03/__algorithm/set_difference.h
index 4092e6753e5f6..943b458de68c3 100644
--- a/libcxx/include/__cxx03/__algorithm/set_difference.h
+++ b/libcxx/include/__cxx03/__algorithm/set_difference.h
@@ -30,8 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__remove_cvref_t<_InIter1>, __remove_cvref_t<_OutIter> >
-__set_difference(
+_LIBCPP_HIDE_FROM_ABI pair<__remove_cvref_t<_InIter1>, __remove_cvref_t<_OutIter> > __set_difference(
_InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) {
while (__first1 != __last1 && __first2 != __last2) {
if (__comp(*__first1, *__first2)) {
@@ -49,7 +48,7 @@ __set_difference(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator set_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -62,7 +61,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_d
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator set_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/set_intersection.h b/libcxx/include/__cxx03/__algorithm/set_intersection.h
index 4e02d3e9c51c7..d892dadd2567a 100644
--- a/libcxx/include/__cxx03/__algorithm/set_intersection.h
+++ b/libcxx/include/__cxx03/__algorithm/set_intersection.h
@@ -37,8 +37,7 @@ struct __set_intersection_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- __set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
+ _LIBCPP_HIDE_FROM_ABI __set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
@@ -47,7 +46,7 @@ struct __set_intersection_result {
// the way it is used and doesn't attempt to abstract that, it's not appropriate for general usage outside of its
// context.
template <class _InForwardIter1, class _InForwardIter2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_intersection_add_output_if_equal(
+_LIBCPP_HIDE_FROM_ABI void __set_intersection_add_output_if_equal(
bool __may_be_equal,
_InForwardIter1& __first1,
_InForwardIter2& __first2,
@@ -83,8 +82,7 @@ template <class _AlgPolicy,
class _InForwardIter2,
class _Sent2,
class _OutIter>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InForwardIter1, _InForwardIter2, _OutIter>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI __set_intersection_result<_InForwardIter1, _InForwardIter2, _OutIter>
__set_intersection(
_InForwardIter1 __first1,
_Sent1 __last1,
@@ -94,7 +92,7 @@ __set_intersection(
_Compare&& __comp,
std::forward_iterator_tag,
std::forward_iterator_tag) {
- _LIBCPP_CONSTEXPR std::__identity __proj;
+ std::__identity __proj;
bool __prev_may_be_equal = false;
while (__first2 != __last2) {
@@ -128,8 +126,7 @@ template <class _AlgPolicy,
class _InInputIter2,
class _Sent2,
class _OutIter>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InInputIter1, _InInputIter2, _OutIter>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI __set_intersection_result<_InInputIter1, _InInputIter2, _OutIter>
__set_intersection(
_InInputIter1 __first1,
_Sent1 __last1,
@@ -159,9 +156,7 @@ __set_intersection(
}
template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InIter1, _InIter2, _OutIter>
-__set_intersection(
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI __set_intersection_result<_InIter1, _InIter2, _OutIter> __set_intersection(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
return std::__set_intersection<_AlgPolicy>(
std::move(__first1),
@@ -175,7 +170,7 @@ __set_intersection(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator set_intersection(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -193,7 +188,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_i
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator set_intersection(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/set_symmetric_difference.h b/libcxx/include/__cxx03/__algorithm/set_symmetric_difference.h
index 64fdf4543be9c..82a1c46d70f0d 100644
--- a/libcxx/include/__cxx03/__algorithm/set_symmetric_difference.h
+++ b/libcxx/include/__cxx03/__algorithm/set_symmetric_difference.h
@@ -34,14 +34,13 @@ struct __set_symmetric_difference_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ _LIBCPP_HIDE_FROM_ABI
__set_symmetric_difference_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
-__set_symmetric_difference(
+_LIBCPP_HIDE_FROM_ABI __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter> __set_symmetric_difference(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
while (__first1 != __last1) {
if (__first2 == __last2) {
@@ -69,7 +68,7 @@ __set_symmetric_difference(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator set_symmetric_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -87,7 +86,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetri
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator set_symmetric_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/set_union.h b/libcxx/include/__cxx03/__algorithm/set_union.h
index a5c6d5eabd394..3effd78aafd01 100644
--- a/libcxx/include/__cxx03/__algorithm/set_union.h
+++ b/libcxx/include/__cxx03/__algorithm/set_union.h
@@ -34,13 +34,12 @@ struct __set_union_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- __set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
+ _LIBCPP_HIDE_FROM_ABI __set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
+_LIBCPP_HIDE_FROM_ABI __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
for (; __first1 != __last1; ++__result) {
if (__first2 == __last2) {
@@ -65,7 +64,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator set_union(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -83,7 +82,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator set_union(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/shuffle.h b/libcxx/include/__cxx03/__algorithm/shuffle.h
index 173af1bf25290..fee7028ae22ac 100644
--- a/libcxx/include/__cxx03/__algorithm/shuffle.h
+++ b/libcxx/include/__cxx03/__algorithm/shuffle.h
@@ -46,8 +46,8 @@ class _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_randomizer {
return __oldstate >> 32;
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+ static _LIBCPP_HIDE_FROM_ABI result_type min() { return _Min; }
+ static _LIBCPP_HIDE_FROM_ABI result_type max() { return _Max; }
private:
uint_fast64_t __state_;
@@ -82,8 +82,8 @@ class _LIBCPP_EXPORTED_FROM_ABI __rs_default {
result_type operator()();
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+ static _LIBCPP_HIDE_FROM_ABI result_type min() { return _Min; }
+ static _LIBCPP_HIDE_FROM_ABI result_type max() { return _Max; }
friend _LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
};
@@ -91,8 +91,7 @@ class _LIBCPP_EXPORTED_FROM_ABI __rs_default {
_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
template <class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
-random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+_LIBCPP_HIDE_FROM_ABI void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
typedef typename _Dp::param_type _Pp;
@@ -109,7 +108,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
}
template <class _RandomAccessIterator, class _RandomNumberGenerator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator&& __rand) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __d = __last - __first;
diff --git a/libcxx/include/__cxx03/__algorithm/sift_down.h b/libcxx/include/__cxx03/__algorithm/sift_down.h
index 774a6d2450d57..d299b718944d3 100644
--- a/libcxx/include/__cxx03/__algorithm/sift_down.h
+++ b/libcxx/include/__cxx03/__algorithm/sift_down.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
__sift_down(_RandomAccessIterator __first,
_Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
@@ -80,7 +80,7 @@ __sift_down(_RandomAccessIterator __first,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator __floyd_sift_down(
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __floyd_sift_down(
_RandomAccessIterator __first,
_Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
diff --git a/libcxx/include/__cxx03/__algorithm/sort.h b/libcxx/include/__cxx03/__algorithm/sort.h
index b89843f514673..41df4d9ff3830 100644
--- a/libcxx/include/__cxx03/__algorithm/sort.h
+++ b/libcxx/include/__cxx03/__algorithm/sort.h
@@ -46,8 +46,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// stable, 2-3 compares, 0-2 swaps
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 unsigned
-__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c) {
+_LIBCPP_HIDE_FROM_ABI unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
unsigned __r = 0;
@@ -260,7 +259,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __sort5_maybe_branchless(
// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
__selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
_BidirectionalIterator __lm1 = __last;
for (--__lm1; __first != __lm1; ++__first) {
@@ -756,9 +755,9 @@ void __introsort(_RandomAccessIterator __first,
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
using _Comp_ref = __comp_ref_type<_Compare>;
// Upper bound for using insertion sort for sorting.
- _LIBCPP_CONSTEXPR difference_type __limit = 24;
+ difference_type __limit = 24;
// Lower bound for using Tuckey's ninther technique for median computation.
- _LIBCPP_CONSTEXPR difference_type __ninther_threshold = 128;
+ difference_type __ninther_threshold = 128;
while (true) {
difference_type __len = __last - __first;
switch (__len) {
@@ -910,8 +909,7 @@ extern template _LIBCPP_EXPORTED_FROM_ABI void
__sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
+_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __depth_limit = 2 * std::__log2i(__last - __first);
@@ -961,7 +959,7 @@ _LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<_
}
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
__sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
@@ -975,14 +973,12 @@ __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp&
}
template <class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
+inline _LIBCPP_HIDE_FROM_ABI void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::sort(__first, __last, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/sort_heap.h b/libcxx/include/__cxx03/__algorithm/sort_heap.h
index b5a341103980e..1a7cad158cd0d 100644
--- a/libcxx/include/__cxx03/__algorithm/sort_heap.h
+++ b/libcxx/include/__cxx03/__algorithm/sort_heap.h
@@ -30,7 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+inline _LIBCPP_HIDE_FROM_ABI void
__sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
_RandomAccessIterator __saved_last = __last;
__comp_ref_type<_Compare> __comp_ref = __comp;
@@ -42,7 +42,7 @@ __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -51,8 +51,7 @@ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
+inline _LIBCPP_HIDE_FROM_ABI void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::sort_heap(std::move(__first), std::move(__last), __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/swap_ranges.h b/libcxx/include/__cxx03/__algorithm/swap_ranges.h
index 9a19ffe602b33..d1f50c135231a 100644
--- a/libcxx/include/__cxx03/__algorithm/swap_ranges.h
+++ b/libcxx/include/__cxx03/__algorithm/swap_ranges.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// 2+2 iterators: the shorter size will be used.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _Sentinel2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator1, _ForwardIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel2 __last2) {
while (__first1 != __last1 && __first2 != __last2) {
_IterOps<_AlgPolicy>::iter_swap(__first1, __first2);
@@ -38,7 +38,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
// 2+1 iterators: size2 >= size1.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator1, _ForwardIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) {
while (__first1 != __last1) {
_IterOps<_AlgPolicy>::iter_swap(__first1, __first2);
@@ -50,7 +50,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
}
template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator2
+inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
return std::__swap_ranges<_ClassicAlgPolicy>(std::move(__first1), std::move(__last1), std::move(__first2)).second;
}
diff --git a/libcxx/include/__cxx03/__algorithm/transform.h b/libcxx/include/__cxx03/__algorithm/transform.h
index 4bed1ed4f8d59..abdf2cc72fecf 100644
--- a/libcxx/include/__cxx03/__algorithm/transform.h
+++ b/libcxx/include/__cxx03/__algorithm/transform.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op) {
for (; __first != __last; ++__first, (void)++__result)
*__result = __op(*__first);
@@ -26,7 +26,7 @@ transform(_InputIterator __first, _InputIterator __last, _OutputIterator __resul
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator transform(
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator transform(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__algorithm/unique.h b/libcxx/include/__cxx03/__algorithm/unique.h
index b7eb2849e4e37..15980b93b4be3 100644
--- a/libcxx/include/__cxx03/__algorithm/unique.h
+++ b/libcxx/include/__cxx03/__algorithm/unique.h
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// unique
template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 std::pair<_Iter, _Iter>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI std::pair<_Iter, _Iter>
__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
__first = std::__adjacent_find(__first, __last, __pred);
if (__first != __last) {
@@ -46,13 +46,13 @@ __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
}
template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
return std::__unique<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred).first;
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last) {
return std::unique(__first, __last, __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/unique_copy.h b/libcxx/include/__cxx03/__algorithm/unique_copy.h
index 6d3daefaa1ca5..5bed5b5d09f54 100644
--- a/libcxx/include/__cxx03/__algorithm/unique_copy.h
+++ b/libcxx/include/__cxx03/__algorithm/unique_copy.h
@@ -37,7 +37,7 @@ struct __read_from_tmp_value_tag {};
} // namespace __unique_copy_tags
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
+_LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
__unique_copy(_InputIterator __first,
_Sent __last,
_OutputIterator __result,
@@ -59,7 +59,7 @@ __unique_copy(_InputIterator __first,
}
template <class _AlgPolicy, class _BinaryPredicate, class _ForwardIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
+_LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
__unique_copy(_ForwardIterator __first,
_Sent __last,
_OutputIterator __result,
@@ -81,7 +81,7 @@ __unique_copy(_ForwardIterator __first,
}
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _InputAndOutputIterator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
+_LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
__unique_copy(_InputIterator __first,
_Sent __last,
_InputAndOutputIterator __result,
@@ -98,7 +98,7 @@ __unique_copy(_InputIterator __first,
}
template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
using __algo_tag = __conditional_t<
is_base_of<forward_iterator_tag, typename iterator_traits<_InputIterator>::iterator_category>::value,
@@ -115,7 +115,7 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/unwrap_iter.h b/libcxx/include/__cxx03/__algorithm/unwrap_iter.h
index b79dcd46b1fa2..d8daa54710840 100644
--- a/libcxx/include/__cxx03/__algorithm/unwrap_iter.h
+++ b/libcxx/include/__cxx03/__algorithm/unwrap_iter.h
@@ -36,8 +36,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// Default case - we can't unwrap anything
template <class _Iter, bool = __libcpp_is_contiguous_iterator<_Iter>::value>
struct __unwrap_iter_impl {
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter, _Iter __iter) { return __iter; }
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __unwrap(_Iter __i) _NOEXCEPT { return __i; }
+ static _LIBCPP_HIDE_FROM_ABI _Iter __rewrap(_Iter, _Iter __iter) { return __iter; }
+ static _LIBCPP_HIDE_FROM_ABI _Iter __unwrap(_Iter __i) _NOEXCEPT { return __i; }
};
// TODO(hardening): make sure that the following unwrapping doesn't unexpectedly turn hardened iterators into raw
@@ -48,25 +48,22 @@ template <class _Iter>
struct __unwrap_iter_impl<_Iter, true> {
using _ToAddressT = decltype(std::__to_address(std::declval<_Iter>()));
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
+ static _LIBCPP_HIDE_FROM_ABI _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
- return std::__to_address(__i);
- }
+ static _LIBCPP_HIDE_FROM_ABI _ToAddressT __unwrap(_Iter __i) _NOEXCEPT { return std::__to_address(__i); }
};
template <class _Iter,
class _Impl = __unwrap_iter_impl<_Iter>,
__enable_if_t<is_copy_constructible<_Iter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 decltype(_Impl::__unwrap(std::declval<_Iter>()))
-__unwrap_iter(_Iter __i) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI decltype(_Impl::__unwrap(std::declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT {
return _Impl::__unwrap(__i);
}
template <class _OrigIter, class _Iter, class _Impl = __unwrap_iter_impl<_OrigIter> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
return _Impl::__rewrap(std::move(__orig_iter), std::move(__iter));
}
diff --git a/libcxx/include/__cxx03/__algorithm/unwrap_range.h b/libcxx/include/__cxx03/__algorithm/unwrap_range.h
index ed1a6b167c608..1926676dd1708 100644
--- a/libcxx/include/__cxx03/__algorithm/unwrap_range.h
+++ b/libcxx/include/__cxx03/__algorithm/unwrap_range.h
@@ -30,12 +30,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// the same type. __unwrap_range tries to get two iterators and then forward to __unwrap_iter.
template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) {
+_LIBCPP_HIDE_FROM_ABI pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) {
return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
}
template <class _Iter, class _Unwrapped>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
+_LIBCPP_HIDE_FROM_ABI _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
}
diff --git a/libcxx/include/__cxx03/__algorithm/upper_bound.h b/libcxx/include/__cxx03/__algorithm/upper_bound.h
index d01780291c6e5..6c7cc37934d91 100644
--- a/libcxx/include/__cxx03/__algorithm/upper_bound.h
+++ b/libcxx/include/__cxx03/__algorithm/upper_bound.h
@@ -31,7 +31,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
+_LIBCPP_HIDE_FROM_ABI _Iter
__upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
while (__len != 0) {
@@ -48,7 +48,7 @@ __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible");
return std::__upper_bound<_ClassicAlgPolicy>(
@@ -56,7 +56,7 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::upper_bound(std::move(__first), std::move(__last), __value, __less<>());
}
diff --git a/libcxx/include/__cxx03/__atomic/atomic.h b/libcxx/include/__cxx03/__atomic/atomic.h
index f275ee32723f9..bc4a3937ce8be 100644
--- a/libcxx/include/__cxx03/__atomic/atomic.h
+++ b/libcxx/include/__cxx03/__atomic/atomic.h
@@ -40,7 +40,7 @@ struct atomic : public __atomic_base<_Tp> {
_LIBCPP_HIDE_FROM_ABI atomic() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
+ _LIBCPP_HIDE_FROM_ABI atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
_LIBCPP_HIDE_FROM_ABI _Tp operator=(_Tp __d) volatile _NOEXCEPT {
__base::store(__d);
@@ -65,7 +65,7 @@ struct atomic<_Tp*> : public __atomic_base<_Tp*> {
_LIBCPP_HIDE_FROM_ABI atomic() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
+ _LIBCPP_HIDE_FROM_ABI atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
_LIBCPP_HIDE_FROM_ABI _Tp* operator=(_Tp* __d) volatile _NOEXCEPT {
__base::store(__d);
@@ -132,14 +132,12 @@ _LIBCPP_HIDE_FROM_ABI bool atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
// atomic_init
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void
-atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void
-atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}
diff --git a/libcxx/include/__cxx03/__atomic/atomic_base.h b/libcxx/include/__cxx03/__atomic/atomic_base.h
index 81424bc40938d..a2b40c6a7e6f2 100644
--- a/libcxx/include/__cxx03/__atomic/atomic_base.h
+++ b/libcxx/include/__cxx03/__atomic/atomic_base.h
@@ -116,7 +116,7 @@ struct __atomic_base // false
_LIBCPP_HIDE_FROM_ABI __atomic_base() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
+ _LIBCPP_HIDE_FROM_ABI __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
__atomic_base(const __atomic_base&) = delete;
};
@@ -127,9 +127,9 @@ template <class _Tp>
struct __atomic_base<_Tp, true> : public __atomic_base<_Tp, false> {
using __base = __atomic_base<_Tp, false>;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __atomic_base() _NOEXCEPT = default;
+ _LIBCPP_HIDE_FROM_ABI __atomic_base() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
+ _LIBCPP_HIDE_FROM_ABI __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
_LIBCPP_HIDE_FROM_ABI _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
return std::__cxx_atomic_fetch_add(std::addressof(this->__a_), __op, __m);
diff --git a/libcxx/include/__cxx03/__atomic/atomic_flag.h b/libcxx/include/__cxx03/__atomic/atomic_flag.h
index fb2aac4ca9f78..316e014163da4 100644
--- a/libcxx/include/__cxx03/__atomic/atomic_flag.h
+++ b/libcxx/include/__cxx03/__atomic/atomic_flag.h
@@ -70,7 +70,7 @@ struct atomic_flag {
}
atomic_flag() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION
+ _LIBCPP_HIDE_FROM_ABI atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION
atomic_flag(const atomic_flag&) = delete;
atomic_flag& operator=(const atomic_flag&) = delete;
diff --git a/libcxx/include/__cxx03/__atomic/cxx_atomic_impl.h b/libcxx/include/__cxx03/__atomic/cxx_atomic_impl.h
index c8dd6e788216a..b956da3d1f706 100644
--- a/libcxx/include/__cxx03/__atomic/cxx_atomic_impl.h
+++ b/libcxx/include/__cxx03/__atomic/cxx_atomic_impl.h
@@ -47,7 +47,7 @@ struct __cxx_atomic_base_impl {
_LIBCPP_HIDE_FROM_ABI
__cxx_atomic_base_impl() _NOEXCEPT : __a_value() {
}
- _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT : __a_value(value) {}
+ explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT : __a_value(value) {}
_Tp __a_value;
};
@@ -262,7 +262,7 @@ struct __cxx_atomic_base_impl {
_LIBCPP_HIDE_FROM_ABI
__cxx_atomic_base_impl() _NOEXCEPT : __a_value() {
}
- _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT : __a_value(__value) {}
+ explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT : __a_value(__value) {}
_LIBCPP_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value;
};
@@ -338,7 +338,7 @@ __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value, memory_orde
std::addressof(__a->__a_value), __value, static_cast<__memory_order_underlying_t>(__order));
}
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR memory_order __to_failure_order(memory_order __order) {
+_LIBCPP_HIDE_FROM_ABI inline memory_order __to_failure_order(memory_order __order) {
// Avoid switch statement to make this a constexpr.
return __order == memory_order_release
? memory_order_relaxed
@@ -494,7 +494,7 @@ struct __cxx_atomic_impl : public _Base {
static_assert(is_trivially_copyable<_Tp>::value, "std::atomic<T> requires that 'T' be a trivially copyable type");
_LIBCPP_HIDE_FROM_ABI __cxx_atomic_impl() _NOEXCEPT = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT : _Base(__value) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT : _Base(__value) {}
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__atomic/to_gcc_order.h b/libcxx/include/__cxx03/__atomic/to_gcc_order.h
index aab3c59602f11..aa510c16691cb 100644
--- a/libcxx/include/__cxx03/__atomic/to_gcc_order.h
+++ b/libcxx/include/__cxx03/__atomic/to_gcc_order.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if defined(__ATOMIC_RELAXED) && defined(__ATOMIC_CONSUME) && defined(__ATOMIC_ACQUIRE) && \
defined(__ATOMIC_RELEASE) && defined(__ATOMIC_ACQ_REL) && defined(__ATOMIC_SEQ_CST)
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) {
+_LIBCPP_HIDE_FROM_ABI inline int __to_gcc_order(memory_order __order) {
// Avoid switch statement to make this a constexpr.
return __order == memory_order_relaxed
? __ATOMIC_RELAXED
@@ -34,7 +34,7 @@ _LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order _
: (__order == memory_order_acq_rel ? __ATOMIC_ACQ_REL : __ATOMIC_CONSUME))));
}
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) {
+_LIBCPP_HIDE_FROM_ABI inline int __to_gcc_failure_order(memory_order __order) {
// Avoid switch statement to make this a constexpr.
return __order == memory_order_relaxed
? __ATOMIC_RELAXED
diff --git a/libcxx/include/__cxx03/__bit/blsr.h b/libcxx/include/__cxx03/__bit/blsr.h
index ae1d8b588925d..30127086c66c5 100644
--- a/libcxx/include/__cxx03/__bit/blsr.h
+++ b/libcxx/include/__cxx03/__bit/blsr.h
@@ -17,15 +17,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned __libcpp_blsr(unsigned __x) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI unsigned __libcpp_blsr(unsigned __x) _NOEXCEPT {
return __x ^ (__x & -__x);
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long __libcpp_blsr(unsigned long __x) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long __libcpp_blsr(unsigned long __x) _NOEXCEPT {
return __x ^ (__x & -__x);
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long long __libcpp_blsr(unsigned long long __x) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long __libcpp_blsr(unsigned long long __x) _NOEXCEPT {
return __x ^ (__x & -__x);
}
diff --git a/libcxx/include/__cxx03/__bit/countl.h b/libcxx/include/__cxx03/__bit/countl.h
index d73f9cac0fa41..3f0161aef6a32 100644
--- a/libcxx/include/__cxx03/__bit/countl.h
+++ b/libcxx/include/__cxx03/__bit/countl.h
@@ -26,20 +26,18 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(unsigned __x) _NOEXCEPT {
- return __builtin_clz(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(unsigned long __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_clz(unsigned long __x) _NOEXCEPT {
return __builtin_clzl(__x);
}
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(unsigned long long __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_clz(unsigned long long __x) _NOEXCEPT {
return __builtin_clzll(__x);
}
#ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
# if __has_builtin(__builtin_clzg)
return __builtin_clzg(__x);
# else
@@ -59,7 +57,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(__uint128_t __x)
#endif // _LIBCPP_HAS_NO_INT128
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int __countl_zero(_Tp __t) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI int __countl_zero(_Tp __t) _NOEXCEPT {
static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_zero requires an unsigned integer type");
#if __has_builtin(__builtin_clzg)
return __builtin_clzg(__t, numeric_limits<_Tp>::digits);
diff --git a/libcxx/include/__cxx03/__bit/countr.h b/libcxx/include/__cxx03/__bit/countr.h
index 84124669ed633..2f5b5591dc3f5 100644
--- a/libcxx/include/__cxx03/__bit/countr.h
+++ b/libcxx/include/__cxx03/__bit/countr.h
@@ -25,20 +25,18 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_ctz(unsigned __x) _NOEXCEPT {
- return __builtin_ctz(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_ctz(unsigned long __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_ctz(unsigned long __x) _NOEXCEPT {
return __builtin_ctzl(__x);
}
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_ctz(unsigned long long __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI int __libcpp_ctz(unsigned long long __x) _NOEXCEPT {
return __builtin_ctzll(__x);
}
template <class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int __countr_zero(_Tp __t) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI int __countr_zero(_Tp __t) _NOEXCEPT {
#if __has_builtin(__builtin_ctzg)
return __builtin_ctzg(__t, numeric_limits<_Tp>::digits);
#else // __has_builtin(__builtin_ctzg)
diff --git a/libcxx/include/__cxx03/__bit/invert_if.h b/libcxx/include/__cxx03/__bit/invert_if.h
index 270bd55a59e96..cc2815e5bbee7 100644
--- a/libcxx/include/__cxx03/__bit/invert_if.h
+++ b/libcxx/include/__cxx03/__bit/invert_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool _Invert, class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __invert_if(_Tp __v) {
+_LIBCPP_HIDE_FROM_ABI _Tp __invert_if(_Tp __v) {
if (_Invert)
return ~__v;
return __v;
diff --git a/libcxx/include/__cxx03/__bit/popcount.h b/libcxx/include/__cxx03/__bit/popcount.h
index b91e80e1a6e5b..64404d2cf4948 100644
--- a/libcxx/include/__cxx03/__bit/popcount.h
+++ b/libcxx/include/__cxx03/__bit/popcount.h
@@ -25,15 +25,11 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_popcount(unsigned __x) _NOEXCEPT {
- return __builtin_popcount(__x);
-}
+inline _LIBCPP_HIDE_FROM_ABI int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_popcount(unsigned long __x) _NOEXCEPT {
- return __builtin_popcountl(__x);
-}
+inline _LIBCPP_HIDE_FROM_ABI int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_popcount(unsigned long long __x) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI int __libcpp_popcount(unsigned long long __x) _NOEXCEPT {
return __builtin_popcountll(__x);
}
diff --git a/libcxx/include/__cxx03/__bit/rotate.h b/libcxx/include/__cxx03/__bit/rotate.h
index f828d73f73cb5..fbe121fe54a67 100644
--- a/libcxx/include/__cxx03/__bit/rotate.h
+++ b/libcxx/include/__cxx03/__bit/rotate.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// to optimize the code. On x86 this function becomes the ROL instruction and
// the rotr function becomes the ROR instruction.
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __rotl(_Tp __x, int __s) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp __rotl(_Tp __x, int __s) _NOEXCEPT {
static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotl requires an unsigned integer type");
const int __N = numeric_limits<_Tp>::digits;
int __r = __s % __N;
@@ -38,7 +38,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __rotl(_Tp __x, int __s)
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __rotr(_Tp __x, int __s) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp __rotr(_Tp __x, int __s) _NOEXCEPT {
static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotr requires an unsigned integer type");
const int __N = numeric_limits<_Tp>::digits;
int __r = __s % __N;
diff --git a/libcxx/include/__cxx03/__bit_reference b/libcxx/include/__cxx03/__bit_reference
index ec87c4faf6474..76027e2d1523f 100644
--- a/libcxx/include/__cxx03/__bit_reference
+++ b/libcxx/include/__cxx03/__bit_reference
@@ -58,16 +58,12 @@ class __bit_reference {
public:
using __container = typename _Cp::__self;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference(const __bit_reference&) = default;
+ _LIBCPP_HIDE_FROM_ABI __bit_reference(const __bit_reference&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator bool() const _NOEXCEPT {
- return static_cast<bool>(*__seg_ & __mask_);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool operator~() const _NOEXCEPT {
- return !static_cast<bool>(*this);
- }
+ _LIBCPP_HIDE_FROM_ABI operator bool() const _NOEXCEPT { return static_cast<bool>(*__seg_ & __mask_); }
+ _LIBCPP_HIDE_FROM_ABI bool operator~() const _NOEXCEPT { return !static_cast<bool>(*this); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference& operator=(bool __x) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bit_reference& operator=(bool __x) _NOEXCEPT {
if (__x)
*__seg_ |= __mask_;
else
@@ -75,18 +71,17 @@ public:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT {
return operator=(static_cast<bool>(__x));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT { *__seg_ ^= __mask_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void flip() _NOEXCEPT { *__seg_ ^= __mask_; }
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> operator&() const _NOEXCEPT {
return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(std::__libcpp_ctz(__mask_)));
}
private:
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s),
__mask_(__m) {}
};
@@ -95,30 +90,28 @@ template <class _Cp>
class __bit_reference<_Cp, false> {};
template <class _Cp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT {
bool __t = __x;
__x = __y;
__y = __t;
}
template <class _Cp, class _Dp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT {
bool __t = __x;
__x = __y;
__y = __t;
}
template <class _Cp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT {
bool __t = __x;
__x = __y;
__y = __t;
}
template <class _Cp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT {
bool __t = __x;
__x = __y;
__y = __t;
@@ -141,21 +134,18 @@ public:
_LIBCPP_HIDE_FROM_ABI __bit_const_reference(const __bit_const_reference&) = default;
__bit_const_reference& operator=(const __bit_const_reference&) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
: __seg_(__x.__seg_),
__mask_(__x.__mask_) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT {
- return static_cast<bool>(*__seg_ & __mask_);
- }
+ _LIBCPP_HIDE_FROM_ABI operator bool() const _NOEXCEPT { return static_cast<bool>(*__seg_ & __mask_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {
return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(std::__libcpp_ctz(__mask_)));
}
private:
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s),
__mask_(__m) {}
};
@@ -163,7 +153,7 @@ private:
// copy
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_aligned(
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_aligned(
__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
using _In = __bit_iterator<_Cp, _IsConst>;
using difference_type = typename _In::difference_type;
@@ -206,7 +196,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> _
}
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_unaligned(
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_unaligned(
__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
using _In = __bit_iterator<_Cp, _IsConst>;
using difference_type = typename _In::difference_type;
@@ -277,7 +267,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> _
}
template <class _Cp, bool _IsConst>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false>
+inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
if (__first.__ctz_ == __result.__ctz_)
return std::__copy_aligned(__first, __last, __result);
@@ -287,7 +277,7 @@ copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
// copy_backward
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_aligned(
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_aligned(
__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
using _In = __bit_iterator<_Cp, _IsConst>;
using difference_type = typename _In::difference_type;
@@ -329,7 +319,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> _
}
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_unaligned(
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_unaligned(
__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
using _In = __bit_iterator<_Cp, _IsConst>;
using difference_type = typename _In::difference_type;
@@ -405,7 +395,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> _
}
template <class _Cp, bool _IsConst>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> copy_backward(
+inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> copy_backward(
__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
if (__last.__ctz_ == __result.__ctz_)
return std::__copy_backward_aligned(__first, __last, __result);
@@ -589,26 +579,26 @@ struct __bit_array {
difference_type __size_;
__storage_type __word_[_Np];
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static difference_type capacity() {
+ _LIBCPP_HIDE_FROM_ABI static difference_type capacity() {
return static_cast<difference_type>(_Np * __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_array(difference_type __s) : __size_(__s) {
+ _LIBCPP_HIDE_FROM_ABI explicit __bit_array(difference_type __s) : __size_(__s) {
if (__libcpp_is_constant_evaluated()) {
for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i)
std::__construct_at(__word_ + __i, 0);
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin() {
+ _LIBCPP_HIDE_FROM_ABI iterator begin() {
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end() {
+ _LIBCPP_HIDE_FROM_ABI iterator end() {
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
static_cast<unsigned>(__size_ % __bits_per_word));
}
};
template <class _Cp>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last) {
using _I1 = __bit_iterator<_Cp, false>;
using difference_type = typename _I1::difference_type;
@@ -649,7 +639,7 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
// equal
template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_unaligned(
+_LIBCPP_HIDE_FROM_ABI bool __equal_unaligned(
__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
using _It = __bit_iterator<_Cp, _IC1>;
using difference_type = typename _It::difference_type;
@@ -721,7 +711,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_unaligned(
}
template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_aligned(
+_LIBCPP_HIDE_FROM_ABI bool __equal_aligned(
__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
using _It = __bit_iterator<_Cp, _IC1>;
using difference_type = typename _It::difference_type;
@@ -760,7 +750,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_aligned(
}
template <class _Cp, bool _IC1, bool _IC2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
if (__first1.__ctz_ == __first2.__ctz_)
return std::__equal_aligned(__first1, __last1, __first2);
@@ -791,14 +781,14 @@ private:
unsigned __ctz_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator() _NOEXCEPT {}
// When _IsConst=false, this is the copy constructor.
// It is non-trivial. Making it trivial would break ABI.
// When _IsConst=true, this is a converting constructor;
// the copy and move constructors are implicitly generated
// and trivial.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
: __seg_(__it.__seg_),
__ctz_(__it.__ctz_) {}
@@ -807,19 +797,18 @@ public:
// the implicit generation of a defaulted one is deprecated.
// When _IsConst=true, the assignment operators are
// implicitly generated and trivial.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator&
- operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator& operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
__seg_ = __it.__seg_;
__ctz_ = __it.__ctz_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator*() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const _NOEXCEPT {
return __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >(
__seg_, __storage_type(1) << __ctz_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator++() {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator& operator++() {
if (__ctz_ != __bits_per_word - 1)
++__ctz_;
else {
@@ -829,13 +818,13 @@ public:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator++(int) {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator operator++(int) {
__bit_iterator __tmp = *this;
++(*this);
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator--() {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator& operator--() {
if (__ctz_ != 0)
--__ctz_;
else {
@@ -845,13 +834,13 @@ public:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator--(int) {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator operator--(int) {
__bit_iterator __tmp = *this;
--(*this);
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator+=(difference_type __n) {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator& operator+=(difference_type __n) {
if (__n >= 0)
__seg_ += (__n + __ctz_) / __bits_per_word;
else
@@ -862,69 +851,56 @@ public:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator-=(difference_type __n) {
- return *this += -__n;
- }
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator& operator-=(difference_type __n) { return *this += -__n; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator+(difference_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator operator+(difference_type __n) const {
__bit_iterator __t(*this);
__t += __n;
return __t;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator-(difference_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI __bit_iterator operator-(difference_type __n) const {
__bit_iterator __t(*this);
__t -= __n;
return __t;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator
- operator+(difference_type __n, const __bit_iterator& __it) {
+ _LIBCPP_HIDE_FROM_ABI friend __bit_iterator operator+(difference_type __n, const __bit_iterator& __it) {
return __it + __n;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend difference_type
- operator-(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend difference_type operator-(const __bit_iterator& __x, const __bit_iterator& __y) {
return (__x.__seg_ - __y.__seg_) * __bits_per_word + __x.__ctz_ - __y.__ctz_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](difference_type __n) const {
- return *(*this + __n);
- }
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const { return *(*this + __n); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator==(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y) {
return __x.__seg_ == __y.__seg_ && __x.__ctz_ == __y.__ctz_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator!=(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y) {
return !(__x == __y);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator<(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y) {
return __x.__seg_ < __y.__seg_ || (__x.__seg_ == __y.__seg_ && __x.__ctz_ < __y.__ctz_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator>(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y) {
return __y < __x;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator<=(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y) {
return !(__y < __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- operator>=(const __bit_iterator& __x, const __bit_iterator& __y) {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y) {
return !(__x < __y);
}
private:
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
: __seg_(__s),
__ctz_(__ctz) {}
@@ -937,26 +913,25 @@ private:
friend struct __bit_array;
template <bool _FillVal, class _Dp>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend void
- __fill_n_bool(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
+ friend void __fill_n_bool(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_aligned(
+ friend __bit_iterator<_Dp, false> __copy_aligned(
__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_unaligned(
+ friend __bit_iterator<_Dp, false> __copy_unaligned(
__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
+ friend __bit_iterator<_Dp, false>
copy(__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_backward_aligned(
+ friend __bit_iterator<_Dp, false> __copy_backward_aligned(
__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_backward_unaligned(
+ friend __bit_iterator<_Dp, false> __copy_backward_unaligned(
__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
+ friend __bit_iterator<_Dp, false>
copy_backward(__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
template <class _Cl, class _Cr>
friend __bit_iterator<_Cr, false>
@@ -968,23 +943,19 @@ private:
friend __bit_iterator<_Cr, false>
swap_ranges(__bit_iterator<_Cl, false>, __bit_iterator<_Cl, false>, __bit_iterator<_Cr, false>);
template <class _Dp>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
+ friend __bit_iterator<_Dp, false>
rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- __equal_aligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
+ friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- __equal_unaligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
+ friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
+ friend bool equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
template <bool _ToFind, class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, _IC>
- __find_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
+ friend __bit_iterator<_Dp, _IC> __find_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
template <bool _ToCount, class _Dp, bool _IC>
- friend typename __bit_iterator<_Dp, _IC>::difference_type _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX20 __count_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
+ friend typename __bit_iterator<_Dp, _IC>::difference_type
+ _LIBCPP_HIDE_FROM_ABI __count_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__chrono/duration.h b/libcxx/include/__cxx03/__chrono/duration.h
index 01c75d7c1abaf..af3aebedb3ccf 100644
--- a/libcxx/include/__cxx03/__chrono/duration.h
+++ b/libcxx/include/__cxx03/__chrono/duration.h
@@ -68,14 +68,14 @@ struct __duration_cast;
template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, true, true> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration operator()(const _FromDuration& __fd) const {
+ _LIBCPP_HIDE_FROM_ABI _ToDuration operator()(const _FromDuration& __fd) const {
return _ToDuration(static_cast<typename _ToDuration::rep>(__fd.count()));
}
};
template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, true, false> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration operator()(const _FromDuration& __fd) const {
+ _LIBCPP_HIDE_FROM_ABI _ToDuration operator()(const _FromDuration& __fd) const {
typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
return _ToDuration(
static_cast<typename _ToDuration::rep>(static_cast<_Ct>(__fd.count()) / static_cast<_Ct>(_Period::den)));
@@ -84,7 +84,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, true, false> {
template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, false, true> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration operator()(const _FromDuration& __fd) const {
+ _LIBCPP_HIDE_FROM_ABI _ToDuration operator()(const _FromDuration& __fd) const {
typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
return _ToDuration(
static_cast<typename _ToDuration::rep>(static_cast<_Ct>(__fd.count()) * static_cast<_Ct>(_Period::num)));
@@ -93,7 +93,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, false, true> {
template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, false, false> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration operator()(const _FromDuration& __fd) const {
+ _LIBCPP_HIDE_FROM_ABI _ToDuration operator()(const _FromDuration& __fd) const {
typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
return _ToDuration(static_cast<typename _ToDuration::rep>(
static_cast<_Ct>(__fd.count()) * static_cast<_Ct>(_Period::num) / static_cast<_Ct>(_Period::den)));
@@ -101,7 +101,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, false, false> {
};
template <class _ToDuration, class _Rep, class _Period, __enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration duration_cast(const duration<_Rep, _Period>& __fd) {
+inline _LIBCPP_HIDE_FROM_ABI _ToDuration duration_cast(const duration<_Rep, _Period>& __fd) {
return __duration_cast<duration<_Rep, _Period>, _ToDuration>()(__fd);
}
@@ -111,9 +111,9 @@ struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {}
template <class _Rep>
struct _LIBCPP_TEMPLATE_VIS duration_values {
public:
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR _Rep zero() _NOEXCEPT { return _Rep(0); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR _Rep max() _NOEXCEPT { return numeric_limits<_Rep>::max(); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR _Rep min() _NOEXCEPT { return numeric_limits<_Rep>::lowest(); }
+ _LIBCPP_HIDE_FROM_ABI static _Rep zero() _NOEXCEPT { return _Rep(0); }
+ _LIBCPP_HIDE_FROM_ABI static _Rep max() _NOEXCEPT { return numeric_limits<_Rep>::max(); }
+ _LIBCPP_HIDE_FROM_ABI static _Rep min() _NOEXCEPT { return numeric_limits<_Rep>::lowest(); }
};
// duration
@@ -165,7 +165,7 @@ class _LIBCPP_TEMPLATE_VIS duration {
__enable_if_t<is_convertible<const _Rep2&, rep>::value &&
(treat_as_floating_point<rep>::value || !treat_as_floating_point<_Rep2>::value),
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit duration(const _Rep2& __r) : __rep_(__r) {}
+ _LIBCPP_HIDE_FROM_ABI explicit duration(const _Rep2& __r) : __rep_(__r) {}
// conversions
template <class _Rep2,
@@ -174,69 +174,63 @@ class _LIBCPP_TEMPLATE_VIS duration {
(__no_overflow<_Period2, period>::type::den == 1 &&
!treat_as_floating_point<_Rep2>::value)),
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration(const duration<_Rep2, _Period2>& __d)
+ _LIBCPP_HIDE_FROM_ABI duration(const duration<_Rep2, _Period2>& __d)
: __rep_(chrono::duration_cast<duration>(__d).count()) {}
// observer
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR rep count() const { return __rep_; }
+ _LIBCPP_HIDE_FROM_ABI rep count() const { return __rep_; }
// arithmetic
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {
+ _LIBCPP_HIDE_FROM_ABI typename common_type<duration>::type operator+() const {
return typename common_type<duration>::type(*this);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {
+ _LIBCPP_HIDE_FROM_ABI typename common_type<duration>::type operator-() const {
return typename common_type<duration>::type(-__rep_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator++() {
+ _LIBCPP_HIDE_FROM_ABI duration& operator++() {
++__rep_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator++(int) { return duration(__rep_++); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator--() {
+ _LIBCPP_HIDE_FROM_ABI duration operator++(int) { return duration(__rep_++); }
+ _LIBCPP_HIDE_FROM_ABI duration& operator--() {
--__rep_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator--(int) { return duration(__rep_--); }
+ _LIBCPP_HIDE_FROM_ABI duration operator--(int) { return duration(__rep_--); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator+=(const duration& __d) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator+=(const duration& __d) {
__rep_ += __d.count();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator-=(const duration& __d) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator-=(const duration& __d) {
__rep_ -= __d.count();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator*=(const rep& __rhs) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator*=(const rep& __rhs) {
__rep_ *= __rhs;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator/=(const rep& __rhs) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator/=(const rep& __rhs) {
__rep_ /= __rhs;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const rep& __rhs) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator%=(const rep& __rhs) {
__rep_ %= __rhs;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const duration& __rhs) {
+ _LIBCPP_HIDE_FROM_ABI duration& operator%=(const duration& __rhs) {
__rep_ %= __rhs.count();
return *this;
}
// special values
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR duration zero() _NOEXCEPT {
- return duration(duration_values<rep>::zero());
- }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR duration min() _NOEXCEPT {
- return duration(duration_values<rep>::min());
- }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR duration max() _NOEXCEPT {
- return duration(duration_values<rep>::max());
- }
+ _LIBCPP_HIDE_FROM_ABI static duration zero() _NOEXCEPT { return duration(duration_values<rep>::zero()); }
+ _LIBCPP_HIDE_FROM_ABI static duration min() _NOEXCEPT { return duration(duration_values<rep>::min()); }
+ _LIBCPP_HIDE_FROM_ABI static duration max() _NOEXCEPT { return duration(duration_values<rep>::max()); }
};
typedef duration<long long, nano> nanoseconds;
@@ -250,7 +244,7 @@ typedef duration< long, ratio<3600> > hours;
template <class _LhsDuration, class _RhsDuration>
struct __duration_eq {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const {
typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
return _Ct(__lhs).count() == _Ct(__rhs).count();
}
@@ -258,13 +252,13 @@ struct __duration_eq {
template <class _LhsDuration>
struct __duration_eq<_LhsDuration, _LhsDuration> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const {
return __lhs.count() == __rhs.count();
}
};
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return __duration_eq<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >()(__lhs, __rhs);
}
@@ -272,7 +266,7 @@ operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
// Duration !=
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator!=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return !(__lhs == __rhs);
}
@@ -281,7 +275,7 @@ operator!=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
template <class _LhsDuration, class _RhsDuration>
struct __duration_lt {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const {
typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
return _Ct(__lhs).count() < _Ct(__rhs).count();
}
@@ -289,13 +283,13 @@ struct __duration_lt {
template <class _LhsDuration>
struct __duration_lt<_LhsDuration, _LhsDuration> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const {
return __lhs.count() < __rhs.count();
}
};
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator<(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return __duration_lt<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >()(__lhs, __rhs);
}
@@ -303,7 +297,7 @@ operator<(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
// Duration >
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator>(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return __rhs < __lhs;
}
@@ -311,7 +305,7 @@ operator>(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
// Duration <=
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return !(__rhs < __lhs);
}
@@ -319,7 +313,7 @@ operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
// Duration >=
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
return !(__lhs < __rhs);
}
@@ -327,8 +321,7 @@ operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
// Duration +
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+inline _LIBCPP_HIDE_FROM_ABI typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
return _Cd(_Cd(__lhs).count() + _Cd(__rhs).count());
@@ -337,8 +330,7 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
// Duration -
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+inline _LIBCPP_HIDE_FROM_ABI typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
return _Cd(_Cd(__lhs).count() - _Cd(__rhs).count());
@@ -350,7 +342,7 @@ template <class _Rep1,
class _Period,
class _Rep2,
__enable_if_t<is_convertible<const _Rep2&, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+inline _LIBCPP_HIDE_FROM_ABI duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
typedef duration<_Cr, _Period> _Cd;
@@ -361,7 +353,7 @@ template <class _Rep1,
class _Period,
class _Rep2,
__enable_if_t<is_convertible<const _Rep1&, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+inline _LIBCPP_HIDE_FROM_ABI duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) {
return __d * __s;
}
@@ -374,7 +366,7 @@ template <class _Rep1,
__enable_if_t<!__is_duration<_Rep2>::value &&
is_convertible<const _Rep2&, typename common_type<_Rep1, _Rep2>::type>::value,
int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+inline _LIBCPP_HIDE_FROM_ABI duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
typedef duration<_Cr, _Period> _Cd;
@@ -382,7 +374,7 @@ operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
}
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename common_type<_Rep1, _Rep2>::type
+inline _LIBCPP_HIDE_FROM_ABI typename common_type<_Rep1, _Rep2>::type
operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Ct;
return _Ct(__lhs).count() / _Ct(__rhs).count();
@@ -396,7 +388,7 @@ template <class _Rep1,
__enable_if_t<!__is_duration<_Rep2>::value &&
is_convertible<const _Rep2&, typename common_type<_Rep1, _Rep2>::type>::value,
int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+inline _LIBCPP_HIDE_FROM_ABI duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
typedef duration<_Cr, _Period> _Cd;
@@ -404,8 +396,7 @@ operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
}
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+inline _LIBCPP_HIDE_FROM_ABI typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
diff --git a/libcxx/include/__cxx03/__chrono/steady_clock.h b/libcxx/include/__cxx03/__chrono/steady_clock.h
index f8a56954f31ad..5a8fa4f84ad48 100644
--- a/libcxx/include/__cxx03/__chrono/steady_clock.h
+++ b/libcxx/include/__cxx03/__chrono/steady_clock.h
@@ -29,7 +29,7 @@ class _LIBCPP_EXPORTED_FROM_ABI steady_clock {
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<steady_clock, duration> time_point;
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = true;
+ static const bool is_steady = true;
static time_point now() _NOEXCEPT;
};
diff --git a/libcxx/include/__cxx03/__chrono/system_clock.h b/libcxx/include/__cxx03/__chrono/system_clock.h
index 28cf3562036b1..09d2d698ad9f2 100644
--- a/libcxx/include/__cxx03/__chrono/system_clock.h
+++ b/libcxx/include/__cxx03/__chrono/system_clock.h
@@ -29,7 +29,7 @@ class _LIBCPP_EXPORTED_FROM_ABI system_clock {
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<system_clock> time_point;
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
+ static const bool is_steady = false;
static time_point now() _NOEXCEPT;
static time_t to_time_t(const time_point& __t) _NOEXCEPT;
diff --git a/libcxx/include/__cxx03/__chrono/time_point.h b/libcxx/include/__cxx03/__chrono/time_point.h
index cf0fbc28a8856..b067e37a11e7a 100644
--- a/libcxx/include/__cxx03/__chrono/time_point.h
+++ b/libcxx/include/__cxx03/__chrono/time_point.h
@@ -43,33 +43,33 @@ class _LIBCPP_TEMPLATE_VIS time_point {
duration __d_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point() : __d_(duration::zero()) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {}
+ _LIBCPP_HIDE_FROM_ABI time_point() : __d_(duration::zero()) {}
+ _LIBCPP_HIDE_FROM_ABI explicit time_point(const duration& __d) : __d_(__d) {}
// conversions
template <class _Duration2, __enable_if_t<is_convertible<_Duration2, duration>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point(const time_point<clock, _Duration2>& __t)
+ _LIBCPP_HIDE_FROM_ABI time_point(const time_point<clock, _Duration2>& __t)
: __d_(__t.time_since_epoch()) {}
// observer
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 duration time_since_epoch() const { return __d_; }
+ _LIBCPP_HIDE_FROM_ABI duration time_since_epoch() const { return __d_; }
// arithmetic
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator+=(const duration& __d) {
+ _LIBCPP_HIDE_FROM_ABI time_point& operator+=(const duration& __d) {
__d_ += __d;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator-=(const duration& __d) {
+ _LIBCPP_HIDE_FROM_ABI time_point& operator-=(const duration& __d) {
__d_ -= __d;
return *this;
}
// special values
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR time_point min() _NOEXCEPT { return time_point(duration::min()); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR time_point max() _NOEXCEPT { return time_point(duration::max()); }
+ _LIBCPP_HIDE_FROM_ABI static time_point min() _NOEXCEPT { return time_point(duration::min()); }
+ _LIBCPP_HIDE_FROM_ABI static time_point max() _NOEXCEPT { return time_point(duration::max()); }
};
} // namespace chrono
@@ -83,7 +83,7 @@ common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _
namespace chrono {
template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, _ToDuration>
+inline _LIBCPP_HIDE_FROM_ABI time_point<_Clock, _ToDuration>
time_point_cast(const time_point<_Clock, _Duration>& __t) {
return time_point<_Clock, _ToDuration>(chrono::duration_cast<_ToDuration>(__t.time_since_epoch()));
}
@@ -91,7 +91,7 @@ time_point_cast(const time_point<_Clock, _Duration>& __t) {
// time_point ==
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __lhs.time_since_epoch() == __rhs.time_since_epoch();
}
@@ -99,7 +99,7 @@ operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point !=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return !(__lhs == __rhs);
}
@@ -107,7 +107,7 @@ operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point <
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __lhs.time_since_epoch() < __rhs.time_since_epoch();
}
@@ -115,7 +115,7 @@ operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point >
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __rhs < __lhs;
}
@@ -123,7 +123,7 @@ operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point <=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return !(__rhs < __lhs);
}
@@ -131,7 +131,7 @@ operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point >=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return !(__lhs < __rhs);
}
@@ -140,7 +140,7 @@ operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
+time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Tr;
return _Tr(__lhs.time_since_epoch() + __rhs);
@@ -150,7 +150,7 @@ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
template <class _Rep1, class _Period1, class _Clock, class _Duration2>
inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
+time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __rhs + __lhs;
}
@@ -159,7 +159,7 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dura
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
+time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Ret;
return _Ret(__lhs.time_since_epoch() - __rhs);
@@ -168,7 +168,7 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
// duration operator-(time_point x, time_point y);
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename common_type<_Duration1, _Duration2>::type
+inline _LIBCPP_HIDE_FROM_ABI typename common_type<_Duration1, _Duration2>::type
operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __lhs.time_since_epoch() - __rhs.time_since_epoch();
}
diff --git a/libcxx/include/__cxx03/__condition_variable/condition_variable.h b/libcxx/include/__cxx03/__condition_variable/condition_variable.h
index 8e41ad89914f9..af0325095fc9f 100644
--- a/libcxx/include/__cxx03/__condition_variable/condition_variable.h
+++ b/libcxx/include/__cxx03/__condition_variable/condition_variable.h
@@ -43,7 +43,7 @@ class _LIBCPP_EXPORTED_FROM_ABI condition_variable {
__libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR condition_variable() _NOEXCEPT = default;
+ _LIBCPP_HIDE_FROM_ABI condition_variable() _NOEXCEPT = default;
# ifdef _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
~condition_variable() = default;
diff --git a/libcxx/include/__cxx03/__config b/libcxx/include/__cxx03/__config
index 0172f76cef912..58e9769d7c0d6 100644
--- a/libcxx/include/__cxx03/__config
+++ b/libcxx/include/__cxx03/__config
@@ -215,15 +215,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
# endif
# endif
-// Incomplete features get their own specific disabling flags. This makes it
-// easier to grep for target specific flags once the feature is complete.
-# if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
-# define _LIBCPP_HAS_NO_INCOMPLETE_PSTL
-# define _LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN
-# define _LIBCPP_HAS_NO_EXPERIMENTAL_TZDB
-# define _LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM
-# endif
-
# if defined(__MVS__)
# include <features.h> // for __NATIVE_ASCII_F
# endif
@@ -306,13 +297,10 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCPP_ALIGNOF(x))))
# define _ALIGNAS(x) __attribute__((__aligned__(x)))
# define _LIBCPP_NORETURN __attribute__((__noreturn__))
-# define _LIBCPP_HAS_NO_NOEXCEPT
# define nullptr __nullptr
# define _NOEXCEPT throw()
-# define _NOEXCEPT_(...)
# define static_assert(...) _Static_assert(__VA_ARGS__)
# define decltype(...) __decltype(__VA_ARGS__)
-# define _LIBCPP_CONSTEXPR
typedef __char16_t char16_t;
typedef __char32_t char32_t;
@@ -666,14 +654,6 @@ typedef __char32_t char32_t;
# define _LIBCPP_DEPRECATED_ATOMIC_SYNC /* nothing */
-# define _LIBCPP_DEPRECATED_IN_CXX11
-
-# define _LIBCPP_DEPRECATED_IN_CXX14
-# define _LIBCPP_DEPRECATED_IN_CXX17
-# define _LIBCPP_DEPRECATED_IN_CXX20
-# define _LIBCPP_DEPRECATED_IN_CXX23
-# define _LIBCPP_DEPRECATED_IN_CXX26
-
# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
# define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
# else
@@ -691,13 +671,6 @@ typedef __char32_t char32_t;
# define _LIBCPP_SUPPRESS_DEPRECATED_POP
# endif
-# define _LIBCPP_EXPLICIT_SINCE_CXX14
-# define _LIBCPP_EXPLICIT_SINCE_CXX23
-# define _LIBCPP_CONSTEXPR_SINCE_CXX14
-# define _LIBCPP_CONSTEXPR_SINCE_CXX17
-# define _LIBCPP_CONSTEXPR_SINCE_CXX20
-# define _LIBCPP_CONSTEXPR_SINCE_CXX23
-
# ifndef _LIBCPP_WEAK
# define _LIBCPP_WEAK __attribute__((__weak__))
# endif
diff --git a/libcxx/include/__cxx03/__debug_utils/randomize_range.h b/libcxx/include/__cxx03/__debug_utils/randomize_range.h
index dec21a01ce3fc..577a6be495e88 100644
--- a/libcxx/include/__cxx03/__debug_utils/randomize_range.h
+++ b/libcxx/include/__cxx03/__debug_utils/randomize_range.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
+_LIBCPP_HIDE_FROM_ABI void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
# error Support for unspecified stability is only for C++11 and higher
diff --git a/libcxx/include/__cxx03/__debug_utils/sanitizers.h b/libcxx/include/__cxx03/__debug_utils/sanitizers.h
index e3cda20468b53..32c4399eb9b67 100644
--- a/libcxx/include/__cxx03/__debug_utils/sanitizers.h
+++ b/libcxx/include/__cxx03/__debug_utils/sanitizers.h
@@ -81,7 +81,7 @@ _LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
// __old_last_contained is the previously last allowed (unpoisoned) element, and
// __new_last_contained is the new last allowed (unpoisoned) element.
template <class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __annotate_contiguous_container(
+_LIBCPP_HIDE_FROM_ABI void __annotate_contiguous_container(
const void* __first_storage,
const void* __last_storage,
const void* __old_last_contained,
diff --git a/libcxx/include/__cxx03/__debug_utils/strict_weak_ordering_check.h b/libcxx/include/__cxx03/__debug_utils/strict_weak_ordering_check.h
index 8d3a918d9b557..98976524a8c01 100644
--- a/libcxx/include/__cxx03/__debug_utils/strict_weak_ordering_check.h
+++ b/libcxx/include/__cxx03/__debug_utils/strict_weak_ordering_check.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RandomAccessIterator, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
__check_strict_weak_ordering_sorted(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
using __diff_t = __iter_diff_t<_RandomAccessIterator>;
diff --git a/libcxx/include/__cxx03/__functional/binary_function.h b/libcxx/include/__cxx03/__functional/binary_function.h
index 61329bb7316c2..06613bdc1e907 100644
--- a/libcxx/include/__cxx03/__functional/binary_function.h
+++ b/libcxx/include/__cxx03/__functional/binary_function.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
+struct _LIBCPP_TEMPLATE_VIS binary_function {
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
typedef _Result result_type;
@@ -27,9 +27,9 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
template <class _Arg1, class _Arg2, class _Result>
struct __binary_function_keep_layout_base {
- using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg1;
- using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+ using first_argument_type = _Arg1;
+ using second_argument_type = _Arg2;
+ using result_type = _Result;
};
_LIBCPP_DIAGNOSTIC_PUSH
diff --git a/libcxx/include/__cxx03/__functional/binary_negate.h b/libcxx/include/__cxx03/__functional/binary_negate.h
index aa9ef71ffd262..f59506cf1fc32 100644
--- a/libcxx/include/__cxx03/__functional/binary_negate.h
+++ b/libcxx/include/__cxx03/__functional/binary_negate.h
@@ -20,25 +20,23 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
+class _LIBCPP_TEMPLATE_VIS binary_negate
: public __binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type,
bool> {
_Predicate __pred_;
public:
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR_SINCE_CXX14 binary_negate(const _Predicate& __pred)
- : __pred_(__pred) {}
+ _LIBCPP_HIDE_FROM_ABI explicit binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(
- const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const typename _Predicate::first_argument_type& __x,
+ const typename _Predicate::second_argument_type& __y) const {
return !__pred_(__x, __y);
}
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI binary_negate<_Predicate>
-not2(const _Predicate& __pred) {
+inline _LIBCPP_HIDE_FROM_ABI binary_negate<_Predicate> not2(const _Predicate& __pred) {
return binary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__cxx03/__functional/binder1st.h b/libcxx/include/__cxx03/__functional/binder1st.h
index 1a4a2ed81c04d..aacb02471c301 100644
--- a/libcxx/include/__cxx03/__functional/binder1st.h
+++ b/libcxx/include/__cxx03/__functional/binder1st.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
+class _LIBCPP_TEMPLATE_VIS binder1st
: public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
@@ -40,8 +40,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder1st<_Operation>
-bind1st(const _Operation& __op, const _Tp& __x) {
+inline _LIBCPP_HIDE_FROM_ABI binder1st<_Operation> bind1st(const _Operation& __op, const _Tp& __x) {
return binder1st<_Operation>(__op, __x);
}
diff --git a/libcxx/include/__cxx03/__functional/binder2nd.h b/libcxx/include/__cxx03/__functional/binder2nd.h
index 06600946e3e96..b45a1fe3cb288 100644
--- a/libcxx/include/__cxx03/__functional/binder2nd.h
+++ b/libcxx/include/__cxx03/__functional/binder2nd.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
+class _LIBCPP_TEMPLATE_VIS binder2nd
: public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
@@ -40,8 +40,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder2nd<_Operation>
-bind2nd(const _Operation& __op, const _Tp& __x) {
+inline _LIBCPP_HIDE_FROM_ABI binder2nd<_Operation> bind2nd(const _Operation& __op, const _Tp& __x) {
return binder2nd<_Operation>(__op, __x);
}
diff --git a/libcxx/include/__cxx03/__functional/identity.h b/libcxx/include/__cxx03/__functional/identity.h
index 6af22948a1f19..b5b86830f54ac 100644
--- a/libcxx/include/__cxx03/__functional/identity.h
+++ b/libcxx/include/__cxx03/__functional/identity.h
@@ -26,7 +26,7 @@ struct __is_identity : false_type {};
struct __identity {
template <class _Tp>
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
return std::forward<_Tp>(__t);
}
diff --git a/libcxx/include/__cxx03/__functional/mem_fn.h b/libcxx/include/__cxx03/__functional/mem_fn.h
index 4577c41bf8499..fb9ffcf55c58d 100644
--- a/libcxx/include/__cxx03/__functional/mem_fn.h
+++ b/libcxx/include/__cxx03/__functional/mem_fn.h
@@ -32,20 +32,17 @@ class __mem_fn : public __weak_result_type<_Tp> {
type __f_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
+ _LIBCPP_HIDE_FROM_ABI __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
// invoke
template <class... _ArgTypes>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-
- typename __invoke_return<type, _ArgTypes...>::type
- operator()(_ArgTypes&&... __args) const {
+ _LIBCPP_HIDE_FROM_ABI typename __invoke_return<type, _ArgTypes...>::type operator()(_ArgTypes&&... __args) const {
return std::__invoke(__f_, std::forward<_ArgTypes>(__args)...);
}
};
template <class _Rp, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn<_Rp _Tp::*> mem_fn(_Rp _Tp::*__pm) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI __mem_fn<_Rp _Tp::*> mem_fn(_Rp _Tp::* __pm) _NOEXCEPT {
return __mem_fn<_Rp _Tp::*>(__pm);
}
diff --git a/libcxx/include/__cxx03/__functional/mem_fun_ref.h b/libcxx/include/__cxx03/__functional/mem_fun_ref.h
index 7a15d19b32f7f..81497e96afde4 100644
--- a/libcxx/include/__cxx03/__functional/mem_fun_ref.h
+++ b/libcxx/include/__cxx03/__functional/mem_fun_ref.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unary_function<_Tp*, _Sp> {
+class _LIBCPP_TEMPLATE_VIS mem_fun_t : public __unary_function<_Tp*, _Sp> {
_Sp (_Tp::*__p_)();
public:
@@ -30,7 +30,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unar
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __binary_function<_Tp*, _Ap, _Sp> {
+class _LIBCPP_TEMPLATE_VIS mem_fun1_t : public __binary_function<_Tp*, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -39,17 +39,17 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __bin
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)()) {
+inline _LIBCPP_HIDE_FROM_ABI mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)()) {
return mem_fun_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap)) {
+inline _LIBCPP_HIDE_FROM_ABI mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
+class _LIBCPP_TEMPLATE_VIS mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
_Sp (_Tp::*__p_)();
public:
@@ -58,7 +58,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
+class _LIBCPP_TEMPLATE_VIS mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -67,18 +67,17 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public _
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)()) {
+inline _LIBCPP_HIDE_FROM_ABI mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)()) {
return mem_fun_ref_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun1_ref_t<_Sp, _Tp, _Ap>
-mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) {
+inline _LIBCPP_HIDE_FROM_ABI mem_fun1_ref_t<_Sp, _Tp, _Ap> mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public __unary_function<const _Tp*, _Sp> {
+class _LIBCPP_TEMPLATE_VIS const_mem_fun_t : public __unary_function<const _Tp*, _Sp> {
_Sp (_Tp::*__p_)() const;
public:
@@ -87,8 +86,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<const _Tp*, _Ap, _Sp> {
+class _LIBCPP_TEMPLATE_VIS const_mem_fun1_t : public __binary_function<const _Tp*, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap) const;
public:
@@ -97,18 +95,17 @@ _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<const _T
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)() const) {
+inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)() const) {
return const_mem_fun_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_t<_Sp, _Tp, _Ap>
-mem_fun(_Sp (_Tp::*__f)(_Ap) const) {
+inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap) const) {
return const_mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
+class _LIBCPP_TEMPLATE_VIS const_mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
_Sp (_Tp::*__p_)() const;
public:
@@ -117,7 +114,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : pub
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
+class _LIBCPP_TEMPLATE_VIS const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap) const;
public:
@@ -126,14 +123,12 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : pu
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_ref_t<_Sp, _Tp>
-mem_fun_ref(_Sp (_Tp::*__f)() const) {
+inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)() const) {
return const_mem_fun_ref_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_ref_t<_Sp, _Tp, _Ap>
-mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const) {
+inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_ref_t<_Sp, _Tp, _Ap> mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const) {
return const_mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
diff --git a/libcxx/include/__cxx03/__functional/operations.h b/libcxx/include/__cxx03/__functional/operations.h
index 9c40a198fee15..43bfbddc41cce 100644
--- a/libcxx/include/__cxx03/__functional/operations.h
+++ b/libcxx/include/__cxx03/__functional/operations.h
@@ -27,9 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS plus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x + __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);
@@ -44,43 +42,35 @@ inline const bool __desugars_to_v<__plus_tag, plus<void>, _Tp, _Up> = true;
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS minus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x - __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS multiplies : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x * __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS divides : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x / __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS modulus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x % __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS negate : __unary_function<_Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return -__x; }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return -__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
@@ -89,27 +79,21 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS bit_and : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x & __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS bit_or : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x | __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS bit_xor : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x ^ __y;
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
@@ -118,9 +102,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x == __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
@@ -136,18 +118,14 @@ inline const bool __desugars_to_v<__equal_tag, equal_to<void>, _Tp, _Up> = true;
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS not_equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x != __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS less : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x < __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);
@@ -157,27 +135,21 @@ inline const bool __desugars_to_v<__less_tag, less<_Tp>, _Tp, _Tp> = true;
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS less_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x <= __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS greater_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x >= __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS greater : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x > __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
@@ -186,25 +158,21 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS logical_and : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x && __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS logical_not : __unary_function<_Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const { return !__x; }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const { return !__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS logical_or : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x || __y;
- }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
diff --git a/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h
index 69ec2c8f8b801..3fe2f4cbc62da 100644
--- a/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h
+++ b/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h
@@ -20,8 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
+class _LIBCPP_TEMPLATE_VIS pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
_Result (*__f_)(_Arg1, _Arg2);
public:
@@ -30,8 +29,7 @@ _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_functio
};
template <class _Arg1, class _Arg2, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_binary_function<_Arg1, _Arg2, _Result>
-ptr_fun(_Result (*__f)(_Arg1, _Arg2)) {
+inline _LIBCPP_HIDE_FROM_ABI pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__f)(_Arg1, _Arg2)) {
return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__f);
}
diff --git a/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h
index 217ce3ff6c957..cf429b922cc94 100644
--- a/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h
+++ b/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h
@@ -20,8 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<_Arg, _Result> {
+class _LIBCPP_TEMPLATE_VIS pointer_to_unary_function : public __unary_function<_Arg, _Result> {
_Result (*__f_)(_Arg);
public:
@@ -30,8 +29,7 @@ _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<
};
template <class _Arg, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_unary_function<_Arg, _Result>
-ptr_fun(_Result (*__f)(_Arg)) {
+inline _LIBCPP_HIDE_FROM_ABI pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__f)(_Arg)) {
return pointer_to_unary_function<_Arg, _Result>(__f);
}
diff --git a/libcxx/include/__cxx03/__functional/reference_wrapper.h b/libcxx/include/__cxx03/__functional/reference_wrapper.h
index 349e1204735d1..bbe8544531a8d 100644
--- a/libcxx/include/__cxx03/__functional/reference_wrapper.h
+++ b/libcxx/include/__cxx03/__functional/reference_wrapper.h
@@ -43,44 +43,39 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> {
template <class _Up,
class = __void_t<decltype(__fun(std::declval<_Up>()))>,
__enable_if_t<!__is_same_uncvref<_Up, reference_wrapper>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper(_Up&& __u)
- _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
+ _LIBCPP_HIDE_FROM_ABI reference_wrapper(_Up&& __u) {
type& __f = static_cast<_Up&&>(__u);
__f_ = std::addressof(__f);
}
// access
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator type&() const _NOEXCEPT { return *__f_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 type& get() const _NOEXCEPT { return *__f_; }
+ _LIBCPP_HIDE_FROM_ABI operator type&() const _NOEXCEPT { return *__f_; }
+ _LIBCPP_HIDE_FROM_ABI type& get() const _NOEXCEPT { return *__f_; }
// invoke
template <class... _ArgTypes>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __invoke_of<type&, _ArgTypes...>::type
- operator()(_ArgTypes&&... __args) const
- {
+ _LIBCPP_HIDE_FROM_ABI typename __invoke_of<type&, _ArgTypes...>::type operator()(_ArgTypes&&... __args) const {
return std::__invoke(get(), std::forward<_ArgTypes>(__args)...);
}
};
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp> ref(_Tp& __t) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI reference_wrapper<_Tp> ref(_Tp& __t) _NOEXCEPT {
return reference_wrapper<_Tp>(__t);
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp>
-ref(reference_wrapper<_Tp> __t) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t) _NOEXCEPT {
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp> cref(const _Tp& __t) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI reference_wrapper<const _Tp> cref(const _Tp& __t) _NOEXCEPT {
return reference_wrapper<const _Tp>(__t);
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
-cref(reference_wrapper<_Tp> __t) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI reference_wrapper<const _Tp> cref(reference_wrapper<_Tp> __t) _NOEXCEPT {
return __t;
}
diff --git a/libcxx/include/__cxx03/__functional/unary_function.h b/libcxx/include/__cxx03/__functional/unary_function.h
index 8bf305a4dfe9f..72193c865b589 100644
--- a/libcxx/include/__cxx03/__functional/unary_function.h
+++ b/libcxx/include/__cxx03/__functional/unary_function.h
@@ -18,15 +18,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function {
+struct _LIBCPP_TEMPLATE_VIS unary_function {
typedef _Arg argument_type;
typedef _Result result_type;
};
template <class _Arg, class _Result>
struct __unary_function_keep_layout_base {
- using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+ using argument_type = _Arg;
+ using result_type = _Result;
};
_LIBCPP_DIAGNOSTIC_PUSH
diff --git a/libcxx/include/__cxx03/__functional/unary_negate.h b/libcxx/include/__cxx03/__functional/unary_negate.h
index 87abbe88e0e75..3591b8ee0d5a3 100644
--- a/libcxx/include/__cxx03/__functional/unary_negate.h
+++ b/libcxx/include/__cxx03/__functional/unary_negate.h
@@ -20,22 +20,16 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function<typename _Predicate::argument_type, bool> {
+class _LIBCPP_TEMPLATE_VIS unary_negate : public __unary_function<typename _Predicate::argument_type, bool> {
_Predicate __pred_;
public:
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI explicit unary_negate(const _Predicate& __pred)
- : __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
- operator()(const typename _Predicate::argument_type& __x) const {
- return !__pred_(__x);
- }
+ _LIBCPP_HIDE_FROM_ABI explicit unary_negate(const _Predicate& __pred) : __pred_(__pred) {}
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const typename _Predicate::argument_type& __x) const { return !__pred_(__x); }
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI unary_negate<_Predicate>
-not1(const _Predicate& __pred) {
+inline _LIBCPP_HIDE_FROM_ABI unary_negate<_Predicate> not1(const _Predicate& __pred) {
return unary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__cxx03/__functional/weak_result_type.h b/libcxx/include/__cxx03/__functional/weak_result_type.h
index e0f42e5aeb9b7..e8c2c4de9900a 100644
--- a/libcxx/include/__cxx03/__functional/weak_result_type.h
+++ b/libcxx/include/__cxx03/__functional/weak_result_type.h
@@ -88,7 +88,7 @@ template <class _Tp, bool = __has_result_type<_Tp>::value>
struct __weak_result_type_imp // bool is true
: public __maybe_derive_from_unary_function<_Tp>,
public __maybe_derive_from_binary_function<_Tp> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = typename _Tp::result_type;
+ using result_type _LIBCPP_NODEBUG = typename _Tp::result_type;
};
template <class _Tp>
@@ -102,17 +102,17 @@ struct __weak_result_type : public __weak_result_type_imp<_Tp> {};
template <class _Rp>
struct __weak_result_type<_Rp()> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp>
struct __weak_result_type<_Rp (&)()> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp>
struct __weak_result_type<_Rp (*)()> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
// 1 argument case
@@ -166,37 +166,37 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile> : public __binary_fu
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp(_A1, _A2, _A3, _A4...)> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp (&)(_A1, _A2, _A3, _A4...)> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp (*)(_A1, _A2, _A3, _A4...)> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...)> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) volatile> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile> {
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG = _Rp;
};
template <class _Tp, class... _Args>
diff --git a/libcxx/include/__cxx03/__fwd/array.h b/libcxx/include/__cxx03/__fwd/array.h
index aea35f29c6423..101faf876333e 100644
--- a/libcxx/include/__cxx03/__fwd/array.h
+++ b/libcxx/include/__cxx03/__fwd/array.h
@@ -22,10 +22,10 @@ template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array;
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
+_LIBCPP_HIDE_FROM_ABI _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT;
+_LIBCPP_HIDE_FROM_ABI const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT;
template <class>
struct __is_std_array : false_type {};
diff --git a/libcxx/include/__cxx03/__fwd/pair.h b/libcxx/include/__cxx03/__fwd/pair.h
index 56d5bae5a90f3..be2c8623f89e5 100644
--- a/libcxx/include/__cxx03/__fwd/pair.h
+++ b/libcxx/include/__cxx03/__fwd/pair.h
@@ -23,12 +23,10 @@ template <class, class>
struct _LIBCPP_TEMPLATE_VIS pair;
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(pair<_T1, _T2>&) _NOEXCEPT;
+_LIBCPP_HIDE_FROM_ABI typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(pair<_T1, _T2>&) _NOEXCEPT;
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(const pair<_T1, _T2>&) _NOEXCEPT;
+_LIBCPP_HIDE_FROM_ABI const typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(const pair<_T1, _T2>&) _NOEXCEPT;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__hash_table b/libcxx/include/__cxx03/__hash_table
index 55c2bd18f6041..ef49ee218f1b0 100644
--- a/libcxx/include/__cxx03/__hash_table
+++ b/libcxx/include/__cxx03/__hash_table
@@ -546,16 +546,11 @@ class __bucket_list_deallocator {
public:
typedef typename __alloc_traits::pointer pointer;
- _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __data_(0, __default_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator() : __data_(0, __default_init_tag()) {}
- _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator(const allocator_type& __a, size_type __size)
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
- : __data_(__size, __a) {}
+ _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator(const allocator_type& __a, size_type __size) : __data_(__size, __a) {}
- _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator(__bucket_list_deallocator&& __x)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
- : __data_(std::move(__x.__data_)) {
+ _LIBCPP_HIDE_FROM_ABI __bucket_list_deallocator(__bucket_list_deallocator&& __x) : __data_(std::move(__x.__data_)) {
__x.size() = 0;
}
@@ -710,27 +705,18 @@ public:
typedef __hash_local_iterator<__node_pointer> local_iterator;
typedef __hash_const_local_iterator<__node_pointer> const_local_iterator;
- _LIBCPP_HIDE_FROM_ABI __hash_table() _NOEXCEPT_(
- is_nothrow_default_constructible<__bucket_list>::value&& is_nothrow_default_constructible<__first_node>::value&&
- is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_default_constructible<hasher>::value&&
- is_nothrow_default_constructible<key_equal>::value);
+ _LIBCPP_HIDE_FROM_ABI __hash_table();
_LIBCPP_HIDE_FROM_ABI __hash_table(const hasher& __hf, const key_equal& __eql);
_LIBCPP_HIDE_FROM_ABI __hash_table(const hasher& __hf, const key_equal& __eql, const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI explicit __hash_table(const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI __hash_table(const __hash_table& __u);
_LIBCPP_HIDE_FROM_ABI __hash_table(const __hash_table& __u, const allocator_type& __a);
- _LIBCPP_HIDE_FROM_ABI __hash_table(__hash_table&& __u) _NOEXCEPT_(
- is_nothrow_move_constructible<__bucket_list>::value&& is_nothrow_move_constructible<__first_node>::value&&
- is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<hasher>::value&&
- is_nothrow_move_constructible<key_equal>::value);
+ _LIBCPP_HIDE_FROM_ABI __hash_table(__hash_table&& __u);
_LIBCPP_HIDE_FROM_ABI __hash_table(__hash_table&& __u, const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI ~__hash_table();
_LIBCPP_HIDE_FROM_ABI __hash_table& operator=(const __hash_table& __u);
- _LIBCPP_HIDE_FROM_ABI __hash_table& operator=(__hash_table&& __u)
- _NOEXCEPT_(__node_traits::propagate_on_container_move_assignment::value&&
- is_nothrow_move_assignable<__node_allocator>::value&& is_nothrow_move_assignable<hasher>::value&&
- is_nothrow_move_assignable<key_equal>::value);
+ _LIBCPP_HIDE_FROM_ABI __hash_table& operator=(__hash_table&& __u);
template <class _InputIterator>
_LIBCPP_HIDE_FROM_ABI void __assign_unique(_InputIterator __first, _InputIterator __last);
template <class _InputIterator>
@@ -871,11 +857,7 @@ public:
template <class _Key>
_LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> __equal_range_multi(const _Key& __k) const;
- _LIBCPP_HIDE_FROM_ABI void swap(__hash_table& __u)
- _NOEXCEPT_(__is_nothrow_swappable_v<hasher>&& __is_nothrow_swappable_v<key_equal> &&
- (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value ||
- __is_nothrow_swappable_v<__pointer_allocator>) &&
- (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>));
+ _LIBCPP_HIDE_FROM_ABI void swap(__hash_table& __u);
_LIBCPP_HIDE_FROM_ABI size_type max_bucket_count() const _NOEXCEPT { return max_size(); }
_LIBCPP_HIDE_FROM_ABI size_type bucket_size(size_type __n) const;
@@ -934,16 +916,11 @@ private:
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __hash_table&, false_type) {}
_LIBCPP_HIDE_FROM_ABI void __move_assign(__hash_table& __u, false_type);
- _LIBCPP_HIDE_FROM_ABI void __move_assign(__hash_table& __u, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value&& is_nothrow_move_assignable<hasher>::value&&
- is_nothrow_move_assignable<key_equal>::value);
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__hash_table& __u) _NOEXCEPT_(
- !__node_traits::propagate_on_container_move_assignment::value ||
- (is_nothrow_move_assignable<__pointer_allocator>::value && is_nothrow_move_assignable<__node_allocator>::value)) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(__hash_table& __u, true_type);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__hash_table& __u) {
__move_assign_alloc(__u, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__hash_table& __u, true_type) _NOEXCEPT_(
- is_nothrow_move_assignable<__pointer_allocator>::value&& is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__hash_table& __u, true_type) {
__bucket_list_.get_deleter().__alloc() = std::move(__u.__bucket_list_.get_deleter().__alloc());
__node_alloc() = std::move(__u.__node_alloc());
}
@@ -959,10 +936,7 @@ private:
};
template <class _Tp, class _Hash, class _Equal, class _Alloc>
-inline __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table() _NOEXCEPT_(
- is_nothrow_default_constructible<__bucket_list>::value&& is_nothrow_default_constructible<__first_node>::value&&
- is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_default_constructible<hasher>::value&&
- is_nothrow_default_constructible<key_equal>::value)
+inline __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table()
: __p2_(0, __default_init_tag()), __p3_(1.0f, __default_init_tag()) {}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
@@ -1003,10 +977,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
__p3_(__u.__p3_) {}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
-__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u) _NOEXCEPT_(
- is_nothrow_move_constructible<__bucket_list>::value&& is_nothrow_move_constructible<__first_node>::value&&
- is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<hasher>::value&&
- is_nothrow_move_constructible<key_equal>::value)
+__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
: __bucket_list_(std::move(__u.__bucket_list_)),
__p1_(std::move(__u.__p1_)),
__p2_(std::move(__u.__p2_)),
@@ -1095,9 +1066,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT {
}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
-void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(__hash_table& __u, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value&& is_nothrow_move_assignable<hasher>::value&&
- is_nothrow_move_assignable<key_equal>::value) {
+void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(__hash_table& __u, true_type) {
clear();
__bucket_list_.reset(__u.__bucket_list_.release());
__bucket_list_.get_deleter().size() = __u.__bucket_list_.get_deleter().size();
@@ -1154,9 +1123,7 @@ void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(__hash_table& __u,
template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline __hash_table<_Tp, _Hash, _Equal, _Alloc>&
-__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u) _NOEXCEPT_(
- __node_traits::propagate_on_container_move_assignment::value&& is_nothrow_move_assignable<__node_allocator>::value&&
- is_nothrow_move_assignable<hasher>::value&& is_nothrow_move_assignable<key_equal>::value) {
+__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u) {
__move_assign(__u, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>());
return *this;
}
@@ -1566,7 +1533,7 @@ void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__do_rehash(size_type __nbc) {
__phash = __chash;
} else {
__next_pointer __np = __cp;
- if _LIBCPP_CONSTEXPR_SINCE_CXX17 (!_UniqueKeys) {
+ if (!_UniqueKeys) {
for (; __np->__next_ != nullptr &&
key_eq()(__cp->__upcast()->__get_value(), __np->__next_->__upcast()->__get_value());
__np = __np->__next_)
@@ -1823,12 +1790,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(const _Key& __k) c
}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
-void __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
- _NOEXCEPT_(__is_nothrow_swappable_v<hasher>&& __is_nothrow_swappable_v<key_equal> &&
- (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value ||
- __is_nothrow_swappable_v<__pointer_allocator>) &&
- (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>))
-{
+void __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) {
_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
__node_traits::propagate_on_container_swap::value || this->__node_alloc() == __u.__node_alloc(),
"unordered container::swap: Either propagate_on_container_swap "
@@ -1869,8 +1831,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const {
template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x, __hash_table<_Tp, _Hash, _Equal, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x, __hash_table<_Tp, _Hash, _Equal, _Alloc>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/__iterator/access.h b/libcxx/include/__cxx03/__iterator/access.h
index 99ba9c4c73d08..52220a1f04121 100644
--- a/libcxx/include/__cxx03/__iterator/access.h
+++ b/libcxx/include/__cxx03/__iterator/access.h
@@ -20,12 +20,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Np>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT {
return __array;
}
template <class _Tp, size_t _Np>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT {
return __array + _Np;
}
diff --git a/libcxx/include/__cxx03/__iterator/advance.h b/libcxx/include/__cxx03/__iterator/advance.h
index 4ebe868735649..d49556a17cc34 100644
--- a/libcxx/include/__cxx03/__iterator/advance.h
+++ b/libcxx/include/__cxx03/__iterator/advance.h
@@ -31,14 +31,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_HIDE_FROM_ABI void
__advance(_InputIter& __i, typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag) {
for (; __n > 0; --__n)
++__i;
}
template <class _BiDirIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_HIDE_FROM_ABI void
__advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag) {
if (__n >= 0)
for (; __n > 0; --__n)
@@ -49,7 +49,7 @@ __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type
}
template <class _RandIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_HIDE_FROM_ABI void
__advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag) {
__i += __n;
}
@@ -58,7 +58,7 @@ template < class _InputIter,
class _Distance,
class _IntegralDistance = decltype(std::__convert_to_integral(std::declval<_Distance>())),
__enable_if_t<is_integral<_IntegralDistance>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void advance(_InputIter& __i, _Distance __orig_n) {
+_LIBCPP_HIDE_FROM_ABI void advance(_InputIter& __i, _Distance __orig_n) {
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
_Difference __n = static_cast<_Difference>(std::__convert_to_integral(__orig_n));
// Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
diff --git a/libcxx/include/__cxx03/__iterator/back_insert_iterator.h b/libcxx/include/__cxx03/__iterator/back_insert_iterator.h
index a9e3370c6a042..e9390a6aa2598 100644
--- a/libcxx/include/__cxx03/__iterator/back_insert_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/back_insert_iterator.h
@@ -28,9 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS back_insert_iterator
- : public iterator<output_iterator_tag, void, void, void, void>
-{
+class _LIBCPP_TEMPLATE_VIS back_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
@@ -44,24 +42,21 @@ class _LIBCPP_TEMPLATE_VIS back_insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x)
- : container(std::addressof(__x)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_HIDE_FROM_ABI explicit back_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+ _LIBCPP_HIDE_FROM_ABI back_insert_iterator& operator=(const typename _Container::value_type& __value) {
container->push_back(__value);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator operator++(int) { return *this; }
+ _LIBCPP_HIDE_FROM_ABI back_insert_iterator& operator*() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI back_insert_iterator& operator++() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI back_insert_iterator operator++(int) { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Container* __get_container() const { return container; }
+ _LIBCPP_HIDE_FROM_ABI _Container* __get_container() const { return container; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(back_insert_iterator);
template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator<_Container>
-back_inserter(_Container& __x) {
+inline _LIBCPP_HIDE_FROM_ABI back_insert_iterator<_Container> back_inserter(_Container& __x) {
return back_insert_iterator<_Container>(__x);
}
diff --git a/libcxx/include/__cxx03/__iterator/bounded_iter.h b/libcxx/include/__cxx03/__iterator/bounded_iter.h
index 1e034fc5bbd72..83296a4cf20b4 100644
--- a/libcxx/include/__cxx03/__iterator/bounded_iter.h
+++ b/libcxx/include/__cxx03/__iterator/bounded_iter.h
@@ -63,7 +63,7 @@ struct __bounded_iter {
_LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter&&) = default;
template <class _OtherIterator, __enable_if_t< is_convertible<_OtherIterator, _Iterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
: __current_(__other.__current_),
__begin_(__other.__begin_),
__end_(__other.__end_) {}
@@ -81,8 +81,7 @@ struct __bounded_iter {
//
// Since it is non-standard for iterators to have this constructor, __bounded_iter must
// be created via `std::__make_bounded_iter`.
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end)
+ _LIBCPP_HIDE_FROM_ABI explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end)
: __current_(__current), __begin_(__begin), __end_(__end) {
_LIBCPP_ASSERT_INTERNAL(
__begin <= __current, "__bounded_iter(current, begin, end): current and begin are inconsistent");
@@ -91,7 +90,7 @@ struct __bounded_iter {
}
template <class _It>
- friend _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It, _It, _It);
+ friend __bounded_iter<_It> __make_bounded_iter(_It, _It, _It);
public:
// Dereference and indexing operations.
@@ -101,19 +100,19 @@ struct __bounded_iter {
// `end`. This is easier for the optimizer because it aligns with the `iter != container.end()`
// checks that typical callers already use (see
// https://github.com/llvm/llvm-project/issues/78829).
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator*: Attempt to dereference an iterator at the end");
return *__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator->: Attempt to dereference an iterator at the end");
return std::__to_address(__current_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin_ - __current_, "__bounded_iter::operator[]: Attempt to index an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -124,31 +123,31 @@ struct __bounded_iter {
// Arithmetic operations.
//
// These operations check that the iterator remains within `[begin, end]`.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator++() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator++() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator++: Attempt to advance an iterator past the end");
++__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter operator++(int) _NOEXCEPT {
__bounded_iter __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator--() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator--() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __begin_, "__bounded_iter::operator--: Attempt to rewind an iterator past the start");
--__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter operator--(int) _NOEXCEPT {
__bounded_iter __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin_ - __current_, "__bounded_iter::operator+=: Attempt to rewind an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -156,20 +155,18 @@ struct __bounded_iter {
__current_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
- operator+(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend __bounded_iter operator+(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
- operator+(difference_type __n, __bounded_iter const& __self) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend __bounded_iter operator+(difference_type __n, __bounded_iter const& __self) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n <= __current_ - __begin_, "__bounded_iter::operator-=: Attempt to rewind an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -177,13 +174,12 @@ struct __bounded_iter {
__current_ -= __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
- operator-(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend __bounded_iter operator-(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp -= __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
+ _LIBCPP_HIDE_FROM_ABI friend difference_type
operator-(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ - __y.__current_;
}
@@ -194,31 +190,25 @@ struct __bounded_iter {
// The valid range for each iterator is also not considered as part of the comparison,
// i.e. two iterators pointing to the same location will be considered equal even
// if they have different validity ranges.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ == __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ != __y.__current_;
}
// TODO(mordante) disable these overloads in the LLVM 20 release.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ < __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ > __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ <= __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI friend bool operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ >= __y.__current_;
}
@@ -232,7 +222,7 @@ struct __bounded_iter {
};
template <class _It>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
+_LIBCPP_HIDE_FROM_ABI __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
return __bounded_iter<_It>(std::move(__it), std::move(__begin), std::move(__end));
}
@@ -245,7 +235,7 @@ struct pointer_traits<__bounded_iter<_Iterator> > {
using element_type = typename pointer_traits<_Iterator>::element_type;
using difference_type = typename pointer_traits<_Iterator>::difference_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static element_type* to_address(pointer __it) _NOEXCEPT {
return std::__to_address(__it.__current_);
}
};
diff --git a/libcxx/include/__cxx03/__iterator/distance.h b/libcxx/include/__cxx03/__iterator/distance.h
index 7b380d72eab0d..656b9606a84dc 100644
--- a/libcxx/include/__cxx03/__iterator/distance.h
+++ b/libcxx/include/__cxx03/__iterator/distance.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 typename iterator_traits<_InputIter>::difference_type
+inline _LIBCPP_HIDE_FROM_ABI typename iterator_traits<_InputIter>::difference_type
__distance(_InputIter __first, _InputIter __last, input_iterator_tag) {
typename iterator_traits<_InputIter>::difference_type __r(0);
for (; __first != __last; ++__first)
@@ -31,13 +31,13 @@ __distance(_InputIter __first, _InputIter __last, input_iterator_tag) {
}
template <class _RandIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 typename iterator_traits<_RandIter>::difference_type
+inline _LIBCPP_HIDE_FROM_ABI typename iterator_traits<_RandIter>::difference_type
__distance(_RandIter __first, _RandIter __last, random_access_iterator_tag) {
return __last - __first;
}
template <class _InputIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 typename iterator_traits<_InputIter>::difference_type
+inline _LIBCPP_HIDE_FROM_ABI typename iterator_traits<_InputIter>::difference_type
distance(_InputIter __first, _InputIter __last) {
return std::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
}
diff --git a/libcxx/include/__cxx03/__iterator/front_insert_iterator.h b/libcxx/include/__cxx03/__iterator/front_insert_iterator.h
index ffc4d0eae8d8c..347858f062060 100644
--- a/libcxx/include/__cxx03/__iterator/front_insert_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/front_insert_iterator.h
@@ -28,9 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS front_insert_iterator
- : public iterator<output_iterator_tag, void, void, void, void>
-{
+class _LIBCPP_TEMPLATE_VIS front_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
@@ -44,22 +42,19 @@ class _LIBCPP_TEMPLATE_VIS front_insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x)
- : container(std::addressof(__x)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_HIDE_FROM_ABI explicit front_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+ _LIBCPP_HIDE_FROM_ABI front_insert_iterator& operator=(const typename _Container::value_type& __value) {
container->push_front(__value);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator operator++(int) { return *this; }
+ _LIBCPP_HIDE_FROM_ABI front_insert_iterator& operator*() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI front_insert_iterator& operator++() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI front_insert_iterator operator++(int) { return *this; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(front_insert_iterator);
template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator<_Container>
-front_inserter(_Container& __x) {
+inline _LIBCPP_HIDE_FROM_ABI front_insert_iterator<_Container> front_inserter(_Container& __x) {
return front_insert_iterator<_Container>(__x);
}
diff --git a/libcxx/include/__cxx03/__iterator/insert_iterator.h b/libcxx/include/__cxx03/__iterator/insert_iterator.h
index df9c6c9e1b3d1..afb1f98b7be1a 100644
--- a/libcxx/include/__cxx03/__iterator/insert_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/insert_iterator.h
@@ -31,9 +31,7 @@ using __insert_iterator_iter_t = typename _Container::iterator;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS insert_iterator
- : public iterator<output_iterator_tag, void, void, void, void>
-{
+class _LIBCPP_TEMPLATE_VIS insert_iterator : public iterator<output_iterator_tag, void, void, void, void> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
@@ -48,22 +46,20 @@ class _LIBCPP_TEMPLATE_VIS insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
+ _LIBCPP_HIDE_FROM_ABI insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
: container(std::addressof(__x)), iter(__i) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_HIDE_FROM_ABI insert_iterator& operator=(const typename _Container::value_type& __value) {
iter = container->insert(iter, __value);
++iter;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++(int) { return *this; }
+ _LIBCPP_HIDE_FROM_ABI insert_iterator& operator*() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI insert_iterator& operator++() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI insert_iterator& operator++(int) { return *this; }
};
template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator<_Container>
+inline _LIBCPP_HIDE_FROM_ABI insert_iterator<_Container>
inserter(_Container& __x, __insert_iterator_iter_t<_Container> __i) {
return insert_iterator<_Container>(__x, __i);
}
diff --git a/libcxx/include/__cxx03/__iterator/istream_iterator.h b/libcxx/include/__cxx03/__iterator/istream_iterator.h
index 477844b8b4a6b..7fa7432391061 100644
--- a/libcxx/include/__cxx03/__iterator/istream_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/istream_iterator.h
@@ -46,7 +46,7 @@ class _LIBCPP_TEMPLATE_VIS istream_iterator
_Tp __value_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
+ _LIBCPP_HIDE_FROM_ABI istream_iterator() : __in_stream_(nullptr), __value_() {}
_LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s)) {
if (!(*__in_stream_ >> __value_))
__in_stream_ = nullptr;
diff --git a/libcxx/include/__cxx03/__iterator/istreambuf_iterator.h b/libcxx/include/__cxx03/__iterator/istreambuf_iterator.h
index f0c8693fe95d0..8cca46ce5ee0e 100644
--- a/libcxx/include/__cxx03/__iterator/istreambuf_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/istreambuf_iterator.h
@@ -61,7 +61,7 @@ class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
}
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
+ _LIBCPP_HIDE_FROM_ABI istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
_LIBCPP_HIDE_FROM_ABI istreambuf_iterator(istream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {}
_LIBCPP_HIDE_FROM_ABI istreambuf_iterator(streambuf_type* __s) _NOEXCEPT : __sbuf_(__s) {}
_LIBCPP_HIDE_FROM_ABI istreambuf_iterator(const __proxy& __p) _NOEXCEPT : __sbuf_(__p.__sbuf_) {}
diff --git a/libcxx/include/__cxx03/__iterator/iterator.h b/libcxx/include/__cxx03/__iterator/iterator.h
index 60114ffc5b4dc..8fbe9739c61ea 100644
--- a/libcxx/include/__cxx03/__iterator/iterator.h
+++ b/libcxx/include/__cxx03/__iterator/iterator.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Category, class _Tp, class _Distance = ptrdiff_t, class _Pointer = _Tp*, class _Reference = _Tp&>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator {
+struct _LIBCPP_TEMPLATE_VIS iterator {
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
diff --git a/libcxx/include/__cxx03/__iterator/move_iterator.h b/libcxx/include/__cxx03/__iterator/move_iterator.h
index 95a364c167c22..c778bb3bb9e17 100644
--- a/libcxx/include/__cxx03/__iterator/move_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/move_iterator.h
@@ -33,8 +33,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter>
-class _LIBCPP_TEMPLATE_VIS move_iterator
-{
+class _LIBCPP_TEMPLATE_VIS move_iterator {
public:
typedef _Iter iterator_type;
typedef _If< __has_random_access_iterator_category<_Iter>::value,
@@ -49,67 +48,58 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
typedef __conditional_t<is_reference<__reference>::value, __libcpp_remove_reference_t<__reference>&&, __reference>
reference;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator++() {
+ _LIBCPP_HIDE_FROM_ABI move_iterator& operator++() {
++__current_;
return *this;
}
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const {
- return __current_;
- }
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator() : __current_() {}
+ _LIBCPP_HIDE_FROM_ABI move_iterator() : __current_() {}
template <class _Up, __enable_if_t< !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator(const move_iterator<_Up>& __u)
- : __current_(__u.base()) {}
+ _LIBCPP_HIDE_FROM_ABI move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
template <class _Up,
__enable_if_t< !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value &&
is_assignable<_Iter&, const _Up&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator=(const move_iterator<_Up>& __u) {
+ _LIBCPP_HIDE_FROM_ABI move_iterator& operator=(const move_iterator<_Up>& __u) {
__current_ = __u.base();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return __current_; }
+ _LIBCPP_HIDE_FROM_ABI _Iter base() const { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
- return static_cast<reference>(*__current_);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](difference_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const { return static_cast<reference>(*__current_); }
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const {
return static_cast<reference>(__current_[__n]);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator++(int) {
+ _LIBCPP_HIDE_FROM_ABI move_iterator operator++(int) {
move_iterator __tmp(*this);
++__current_;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator--() {
+ _LIBCPP_HIDE_FROM_ABI move_iterator& operator--() {
--__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator--(int) {
+ _LIBCPP_HIDE_FROM_ABI move_iterator operator--(int) {
move_iterator __tmp(*this);
--__current_;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator+(difference_type __n) const {
- return move_iterator(__current_ + __n);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator+=(difference_type __n) {
+ _LIBCPP_HIDE_FROM_ABI move_iterator operator+(difference_type __n) const { return move_iterator(__current_ + __n); }
+ _LIBCPP_HIDE_FROM_ABI move_iterator& operator+=(difference_type __n) {
__current_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator-(difference_type __n) const {
- return move_iterator(__current_ - __n);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator-=(difference_type __n) {
+ _LIBCPP_HIDE_FROM_ABI move_iterator operator-(difference_type __n) const { return move_iterator(__current_ - __n); }
+ _LIBCPP_HIDE_FROM_ABI move_iterator& operator-=(difference_type __n) {
__current_ -= __n;
return *this;
}
@@ -123,38 +113,32 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_iterator);
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() == __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() != __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() < __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() > __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() <= __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() >= __y.base();
}
@@ -165,13 +149,13 @@ operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
}
template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter>
+inline _LIBCPP_HIDE_FROM_ABI move_iterator<_Iter>
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x) {
return move_iterator<_Iter>(__x.base() + __n);
}
template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter> make_move_iterator(_Iter __i) {
+inline _LIBCPP_HIDE_FROM_ABI move_iterator<_Iter> make_move_iterator(_Iter __i) {
return move_iterator<_Iter>(std::move(__i));
}
diff --git a/libcxx/include/__cxx03/__iterator/next.h b/libcxx/include/__cxx03/__iterator/next.h
index 6ee32a433277f..16ebaed172d11 100644
--- a/libcxx/include/__cxx03/__iterator/next.h
+++ b/libcxx/include/__cxx03/__iterator/next.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
+inline _LIBCPP_HIDE_FROM_ABI _InputIter
next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
// Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
// Note that this check duplicates the similar check in `std::advance`.
diff --git a/libcxx/include/__cxx03/__iterator/prev.h b/libcxx/include/__cxx03/__iterator/prev.h
index 82b2ef67a73fa..dc1bdaf584022 100644
--- a/libcxx/include/__cxx03/__iterator/prev.h
+++ b/libcxx/include/__cxx03/__iterator/prev.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
+inline _LIBCPP_HIDE_FROM_ABI _InputIter
prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
// Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
// Note that this check duplicates the similar check in `std::advance`.
diff --git a/libcxx/include/__cxx03/__iterator/reverse_iterator.h b/libcxx/include/__cxx03/__iterator/reverse_iterator.h
index d9664b1cfa792..b06dad13ea789 100644
--- a/libcxx/include/__cxx03/__iterator/reverse_iterator.h
+++ b/libcxx/include/__cxx03/__iterator/reverse_iterator.h
@@ -42,8 +42,7 @@ class _LIBCPP_TEMPLATE_VIS reverse_iterator
typename iterator_traits<_Iter>::value_type,
typename iterator_traits<_Iter>::difference_type,
typename iterator_traits<_Iter>::pointer,
- typename iterator_traits<_Iter>::reference>
-{
+ typename iterator_traits<_Iter>::reference> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
private:
@@ -61,130 +60,114 @@ class _LIBCPP_TEMPLATE_VIS reverse_iterator
_If<__has_random_access_iterator_category<_Iter>::value,
random_access_iterator_tag,
typename iterator_traits<_Iter>::iterator_category>;
- using pointer = typename iterator_traits<_Iter>::pointer;
+ using pointer = typename iterator_traits<_Iter>::pointer;
using value_type = typename iterator_traits<_Iter>::value_type;
using difference_type = typename iterator_traits<_Iter>::difference_type;
using reference = typename iterator_traits<_Iter>::reference;
#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : __t_(), current() {}
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator() : __t_(), current() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}
+ _LIBCPP_HIDE_FROM_ABI explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}
template <class _Up, __enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u)
- : __t_(__u.base()), current(__u.base()) {}
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator(const reverse_iterator<_Up>& __u) : __t_(__u.base()), current(__u.base()) {}
template <class _Up,
__enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
__t_ = current = __u.base();
return *this;
}
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : current() {}
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator() : current() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : current(__x) {}
+ _LIBCPP_HIDE_FROM_ABI explicit reverse_iterator(_Iter __x) : current(__x) {}
template <class _Up, __enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u)
- : current(__u.base()) {}
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator(const reverse_iterator<_Up>& __u) : current(__u.base()) {}
template <class _Up,
__enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
current = __u.base();
return *this;
}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return current; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
+ _LIBCPP_HIDE_FROM_ABI _Iter base() const { return current; }
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const {
_Iter __tmp = current;
return *--__tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const { return std::addressof(operator*()); }
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const { return std::addressof(operator*()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator++() {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator++() {
--current;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator++(int) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator operator++(int) {
reverse_iterator __tmp(*this);
--current;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator--() {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator--() {
++current;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator--(int) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator operator--(int) {
reverse_iterator __tmp(*this);
++current;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator+(difference_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator operator+(difference_type __n) const {
return reverse_iterator(current - __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator+=(difference_type __n) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator+=(difference_type __n) {
current -= __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator-(difference_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator operator-(difference_type __n) const {
return reverse_iterator(current + __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator-=(difference_type __n) {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator& operator-=(difference_type __n) {
current += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](difference_type __n) const {
- return *(*this + __n);
- }
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const { return *(*this + __n); }
};
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() == __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() > __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() != __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() < __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() <= __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-{
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __x.base() >= __y.base();
}
@@ -195,7 +178,7 @@ operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
}
template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Iter>
+inline _LIBCPP_HIDE_FROM_ABI reverse_iterator<_Iter>
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x) {
return reverse_iterator<_Iter>(__x.base() - __n);
}
@@ -205,13 +188,12 @@ struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b> {
using _UnwrappedIter = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
using _ReverseWrapper = reverse_iterator<reverse_iterator<_Iter> >;
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ReverseWrapper
- __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
+ static _LIBCPP_HIDE_FROM_ABI _ReverseWrapper __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
return _ReverseWrapper(
reverse_iterator<_Iter>(__unwrap_iter_impl<_Iter>::__rewrap(__orig_iter.base().base(), __unwrapped_iter)));
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
return __unwrap_iter_impl<_Iter>::__unwrap(__i.base().base());
}
};
diff --git a/libcxx/include/__cxx03/__iterator/wrap_iter.h b/libcxx/include/__cxx03/__iterator/wrap_iter.h
index 13d7e27f37698..22c9e2dfb5f5a 100644
--- a/libcxx/include/__cxx03/__iterator/wrap_iter.h
+++ b/libcxx/include/__cxx03/__iterator/wrap_iter.h
@@ -38,57 +38,50 @@ class __wrap_iter {
iterator_type __i_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter() _NOEXCEPT : __i_() {}
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter() _NOEXCEPT : __i_() {}
template <class _Up, __enable_if_t<is_convertible<_Up, iterator_type>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter(const __wrap_iter<_Up>& __u) _NOEXCEPT
- : __i_(__u.base()) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT { return *__i_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
- return std::__to_address(__i_);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter(const __wrap_iter<_Up>& __u) _NOEXCEPT : __i_(__u.base()) {}
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const _NOEXCEPT { return *__i_; }
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const _NOEXCEPT { return std::__to_address(__i_); }
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter& operator++() _NOEXCEPT {
++__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter operator++(int) _NOEXCEPT {
__wrap_iter __tmp(*this);
++(*this);
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator--() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter& operator--() _NOEXCEPT {
--__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter operator--(int) _NOEXCEPT {
__wrap_iter __tmp(*this);
--(*this);
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator+(difference_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter operator+(difference_type __n) const _NOEXCEPT {
__wrap_iter __w(*this);
__w += __n;
return __w;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter& operator+=(difference_type __n) _NOEXCEPT {
__i_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator-(difference_type __n) const _NOEXCEPT {
- return *this + (-__n);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter operator-(difference_type __n) const _NOEXCEPT { return *this + (-__n); }
+ _LIBCPP_HIDE_FROM_ABI __wrap_iter& operator-=(difference_type __n) _NOEXCEPT {
*this += -__n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
- return __i_[__n];
- }
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const _NOEXCEPT { return __i_[__n]; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 iterator_type base() const _NOEXCEPT { return __i_; }
+ _LIBCPP_HIDE_FROM_ABI iterator_type base() const _NOEXCEPT { return __i_; }
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i_(__x) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i_(__x) {}
template <class _Up>
friend class __wrap_iter;
@@ -105,86 +98,74 @@ class __wrap_iter {
};
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return __x.base() == __y.base();
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __x.base() == __y.base();
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return __x.base() < __y.base();
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __x.base() < __y.base();
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return !(__x == __y);
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__x == __y);
}
// TODO(mordante) disable these overloads in the LLVM 20 release.
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return __y < __x;
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __y < __x;
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return !(__x < __y);
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__x < __y);
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT {
return !(__y < __x);
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
-operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__y < __x);
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __wrap_iter<_Iter1>::difference_type
+_LIBCPP_HIDE_FROM_ABI typename __wrap_iter<_Iter1>::difference_type
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __x.base() - __y.base();
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter<_Iter1>
+_LIBCPP_HIDE_FROM_ABI __wrap_iter<_Iter1>
operator+(typename __wrap_iter<_Iter1>::difference_type __n, __wrap_iter<_Iter1> __x) _NOEXCEPT {
__x += __n;
return __x;
@@ -199,9 +180,7 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> > {
typedef typename pointer_traits<_It>::element_type element_type;
typedef typename pointer_traits<_It>::difference_type difference_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __w) _NOEXCEPT {
- return std::__to_address(__w.base());
- }
+ _LIBCPP_HIDE_FROM_ABI static element_type* to_address(pointer __w) _NOEXCEPT { return std::__to_address(__w.base()); }
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__locale b/libcxx/include/__cxx03/__locale
index 1deda8d1149e7..d5faa89b99fc0 100644
--- a/libcxx/include/__cxx03/__locale
+++ b/libcxx/include/__cxx03/__locale
@@ -132,7 +132,7 @@ class _LIBCPP_EXPORTED_FROM_ABI locale::id {
static int32_t __next_id;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR id() : __id_(0) {}
+ _LIBCPP_HIDE_FROM_ABI id() : __id_(0) {}
void operator=(const id&) = delete;
id(const id&) = delete;
@@ -903,8 +903,7 @@ protected:
// template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20
template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t>
- : public locale::facet, public codecvt_base {
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t> : public locale::facet, public codecvt_base {
public:
typedef char16_t intern_type;
typedef char extern_type;
@@ -1066,8 +1065,7 @@ protected:
// template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20
template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t>
- : public locale::facet, public codecvt_base {
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t> : public locale::facet, public codecvt_base {
public:
typedef char32_t intern_type;
typedef char extern_type;
@@ -1249,10 +1247,8 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
#endif
-extern template class _LIBCPP_DEPRECATED_IN_CXX20
-_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
-extern template class _LIBCPP_DEPRECATED_IN_CXX20
-_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
+extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
+extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
#ifndef _LIBCPP_HAS_NO_CHAR8_T
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; // C++20
diff --git a/libcxx/include/__cxx03/__math/traits.h b/libcxx/include/__cxx03/__math/traits.h
index f62509c32c008..0d27680d579a4 100644
--- a/libcxx/include/__cxx03/__math/traits.h
+++ b/libcxx/include/__cxx03/__math/traits.h
@@ -46,90 +46,76 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1) _NOEXCEPT {
// isfinite
template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && numeric_limits<_A1>::has_infinity, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1 __x) _NOEXCEPT {
return __builtin_isfinite((typename __promote<_A1>::type)__x);
}
template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && !numeric_limits<_A1>::has_infinity, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1) _NOEXCEPT {
return true;
}
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(float __x) _NOEXCEPT {
- return __builtin_isfinite(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isfinite(float __x) _NOEXCEPT { return __builtin_isfinite(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(double __x) _NOEXCEPT {
- return __builtin_isfinite(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isfinite(double __x) _NOEXCEPT { return __builtin_isfinite(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(long double __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isfinite(long double __x) _NOEXCEPT {
return __builtin_isfinite(__x);
}
// isinf
template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && numeric_limits<_A1>::has_infinity, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isinf(_A1 __x) _NOEXCEPT {
return __builtin_isinf((typename __promote<_A1>::type)__x);
}
template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && !numeric_limits<_A1>::has_infinity, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isinf(_A1) _NOEXCEPT {
return false;
}
#ifdef _LIBCPP_PREFERRED_OVERLOAD
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT {
- return __builtin_isinf(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT { return __builtin_isinf(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool
-isinf(double __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isinf(double __x) _NOEXCEPT {
return __builtin_isinf(__x);
}
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT {
- return __builtin_isinf(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT { return __builtin_isinf(__x); }
#endif
// isnan
template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isnan(_A1 __x) _NOEXCEPT {
return __builtin_isnan(__x);
}
template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(_A1) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isnan(_A1) _NOEXCEPT {
return false;
}
#ifdef _LIBCPP_PREFERRED_OVERLOAD
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT {
- return __builtin_isnan(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT { return __builtin_isnan(__x); }
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool
-isnan(double __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isnan(double __x) _NOEXCEPT {
return __builtin_isnan(__x);
}
-_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT {
- return __builtin_isnan(__x);
-}
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT { return __builtin_isnan(__x); }
#endif
// isnormal
template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
return __builtin_isnormal(__x);
}
template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
-_LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
return __x != 0;
}
diff --git a/libcxx/include/__cxx03/__memory/addressof.h b/libcxx/include/__cxx03/__memory/addressof.h
index 81c6a696f0631..9bb49baef21f6 100644
--- a/libcxx/include/__cxx03/__memory/addressof.h
+++ b/libcxx/include/__cxx03/__memory/addressof.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_NO_CFI _LIBCPP_HIDE_FROM_ABI _Tp* addressof(_Tp& __x) _NOEXCEPT {
+inline _LIBCPP_NO_CFI _LIBCPP_HIDE_FROM_ABI _Tp* addressof(_Tp& __x) _NOEXCEPT {
return __builtin_addressof(__x);
}
diff --git a/libcxx/include/__cxx03/__memory/allocate_at_least.h b/libcxx/include/__cxx03/__memory/allocate_at_least.h
index 3906d88599c74..3a906c7145b75 100644
--- a/libcxx/include/__cxx03/__memory/allocate_at_least.h
+++ b/libcxx/include/__cxx03/__memory/allocate_at_least.h
@@ -26,8 +26,7 @@ struct __allocation_result {
};
template <class _Alloc>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR __allocation_result<typename allocator_traits<_Alloc>::pointer>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI __allocation_result<typename allocator_traits<_Alloc>::pointer>
__allocate_at_least(_Alloc& __alloc, size_t __n) {
return {__alloc.allocate(__n), __n};
}
diff --git a/libcxx/include/__cxx03/__memory/allocator.h b/libcxx/include/__cxx03/__memory/allocator.h
index e527c0582be8f..cd6f7d9ad4476 100644
--- a/libcxx/include/__cxx03/__memory/allocator.h
+++ b/libcxx/include/__cxx03/__memory/allocator.h
@@ -32,36 +32,34 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
class allocator;
-// These specializations shouldn't be marked _LIBCPP_DEPRECATED_IN_CXX17.
-// Specializing allocator<void> is deprecated, but not using it.
template <>
class _LIBCPP_TEMPLATE_VIS allocator<void> {
public:
- _LIBCPP_DEPRECATED_IN_CXX17 typedef void* pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const void* const_pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef void value_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
template <class _Up>
- struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+ struct rebind {
typedef allocator<_Up> other;
};
};
// TODO(LLVM 20): Remove the escape hatch
-# ifdef _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST
+#ifdef _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST
template <>
class _LIBCPP_TEMPLATE_VIS allocator<const void> {
public:
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const void* pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const void* const_pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const void value_type;
+ typedef const void* pointer;
+ typedef const void* const_pointer;
+ typedef const void value_type;
template <class _Up>
- struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+ struct rebind {
typedef allocator<_Up> other;
};
};
-# endif // _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST
+#endif // _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST
// This class provides a non-trivial default constructor to the class that derives from it
// if the condition is satisfied.
@@ -80,7 +78,7 @@ struct __non_trivial_if {};
template <class _Unique>
struct __non_trivial_if<true, _Unique> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __non_trivial_if() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __non_trivial_if() _NOEXCEPT {}
};
// allocator
@@ -98,14 +96,14 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
typedef ptrdiff_t difference_type;
typedef _Tp value_type;
typedef true_type propagate_on_container_move_assignment;
- _LIBCPP_DEPRECATED_IN_CXX23 typedef true_type is_always_equal;
+ typedef true_type is_always_equal;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator() _NOEXCEPT = default;
+ _LIBCPP_HIDE_FROM_ABI allocator() _NOEXCEPT = default;
template <class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator(const allocator<_Up>&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI allocator(const allocator<_Up>&) _NOEXCEPT {}
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp* allocate(size_t __n) {
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Tp* allocate(size_t __n) {
if (__n > allocator_traits<allocator>::max_size(*this))
__throw_bad_array_new_length();
if (__libcpp_is_constant_evaluated()) {
@@ -115,7 +113,7 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {
if (__libcpp_is_constant_evaluated()) {
::operator delete(__p);
} else {
@@ -124,42 +122,33 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
}
// C++20 Removed members
- _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp* pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
template <class _Up>
- struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+ struct rebind {
typedef allocator<_Up> other;
};
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI pointer address(reference __x) const _NOEXCEPT {
- return std::addressof(__x);
- }
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI const_pointer address(const_reference __x) const _NOEXCEPT {
- return std::addressof(__x);
- }
+ _LIBCPP_HIDE_FROM_ABI pointer address(reference __x) const _NOEXCEPT { return std::addressof(__x); }
+ _LIBCPP_HIDE_FROM_ABI const_pointer address(const_reference __x) const _NOEXCEPT { return std::addressof(__x); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 _Tp* allocate(size_t __n, const void*) {
- return allocate(__n);
- }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Tp* allocate(size_t __n, const void*) { return allocate(__n); }
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
- return size_type(~0) / sizeof(_Tp);
- }
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return size_type(~0) / sizeof(_Tp); }
template <class _Up, class... _Args>
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void construct(_Up* __p, _Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI void construct(_Up* __p, _Args&&... __args) {
::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
}
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { __p->~_Tp(); }
+ _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { __p->~_Tp(); }
};
template <class _Tp, class _Up>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
-operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {
return true;
}
diff --git a/libcxx/include/__cxx03/__memory/allocator_traits.h b/libcxx/include/__cxx03/__memory/allocator_traits.h
index 8708ed2ccea4c..6e7b8ca51f881 100644
--- a/libcxx/include/__cxx03/__memory/allocator_traits.h
+++ b/libcxx/include/__cxx03/__memory/allocator_traits.h
@@ -245,13 +245,12 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits {
using other = allocator_traits<typename rebind_alloc<_Tp>::other>;
};
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
- allocate(allocator_type& __a, size_type __n) {
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static pointer allocate(allocator_type& __a, size_type __n) {
return __a.allocate(__n);
}
template <class _Ap = _Alloc, __enable_if_t<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value, int> = 0>
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static pointer
allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
return __a.allocate(__n, __hint);
@@ -260,19 +259,17 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits {
template <class _Ap = _Alloc,
class = void,
__enable_if_t<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value, int> = 0>
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static pointer
allocate(allocator_type& __a, size_type __n, const_void_pointer) {
return __a.allocate(__n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void
- deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT {
__a.deallocate(__p, __n);
}
template <class _Tp, class... _Args, __enable_if_t<__has_construct<allocator_type, _Tp*, _Args...>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void
- construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
__a.construct(__p, std::forward<_Args>(__args)...);
_LIBCPP_SUPPRESS_DEPRECATED_POP
@@ -281,43 +278,40 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits {
class... _Args,
class = void,
__enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void
- construct(allocator_type&, _Tp* __p, _Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
std::__construct_at(__p, std::forward<_Args>(__args)...);
}
template <class _Tp, __enable_if_t<__has_destroy<allocator_type, _Tp*>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void destroy(allocator_type& __a, _Tp* __p) {
+ _LIBCPP_HIDE_FROM_ABI static void destroy(allocator_type& __a, _Tp* __p) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
__a.destroy(__p);
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Tp, class = void, __enable_if_t<!__has_destroy<allocator_type, _Tp*>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void destroy(allocator_type&, _Tp* __p) {
+ _LIBCPP_HIDE_FROM_ABI static void destroy(allocator_type&, _Tp* __p) {
std::__destroy_at(__p);
}
template <class _Ap = _Alloc, __enable_if_t<__has_max_size<const _Ap>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static size_type max_size(const allocator_type& __a) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static size_type max_size(const allocator_type& __a) _NOEXCEPT {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
return __a.max_size();
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Ap = _Alloc, class = void, __enable_if_t<!__has_max_size<const _Ap>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static size_type max_size(const allocator_type&) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static size_type max_size(const allocator_type&) _NOEXCEPT {
return numeric_limits<size_type>::max() / sizeof(value_type);
}
template <class _Ap = _Alloc, __enable_if_t<__has_select_on_container_copy_construction<const _Ap>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static allocator_type
- select_on_container_copy_construction(const allocator_type& __a) {
+ _LIBCPP_HIDE_FROM_ABI static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a.select_on_container_copy_construction();
}
template <class _Ap = _Alloc,
class = void,
__enable_if_t<!__has_select_on_container_copy_construction<const _Ap>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static allocator_type
- select_on_container_copy_construction(const allocator_type& __a) {
+ _LIBCPP_HIDE_FROM_ABI static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a;
}
};
diff --git a/libcxx/include/__cxx03/__memory/assume_aligned.h b/libcxx/include/__cxx03/__memory/assume_aligned.h
index f504e95431cd6..e0e2b690b513d 100644
--- a/libcxx/include/__cxx03/__memory/assume_aligned.h
+++ b/libcxx/include/__cxx03/__memory/assume_aligned.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <size_t _Np, class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __assume_aligned(_Tp* __ptr) {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Tp* __assume_aligned(_Tp* __ptr) {
static_assert(_Np != 0 && (_Np & (_Np - 1)) == 0, "std::assume_aligned<N>(p) requires N to be a power of two");
if (__libcpp_is_constant_evaluated()) {
diff --git a/libcxx/include/__cxx03/__memory/auto_ptr.h b/libcxx/include/__cxx03/__memory/auto_ptr.h
index b27f5cf49cd1e..3c3a8881cb2b8 100644
--- a/libcxx/include/__cxx03/__memory/auto_ptr.h
+++ b/libcxx/include/__cxx03/__memory/auto_ptr.h
@@ -19,12 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref {
+struct auto_ptr_ref {
_Tp* __ptr_;
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr {
+class _LIBCPP_TEMPLATE_VIS auto_ptr {
private:
_Tp* __ptr_;
@@ -78,7 +78,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr {
};
template <>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr<void> {
+class _LIBCPP_TEMPLATE_VIS auto_ptr<void> {
public:
typedef void element_type;
};
diff --git a/libcxx/include/__cxx03/__memory/builtin_new_allocator.h b/libcxx/include/__cxx03/__memory/builtin_new_allocator.h
index e14a57e8a0611..f939d08f61dd7 100644
--- a/libcxx/include/__cxx03/__memory/builtin_new_allocator.h
+++ b/libcxx/include/__cxx03/__memory/builtin_new_allocator.h
@@ -28,7 +28,7 @@ struct __builtin_new_allocator {
struct __builtin_new_deleter {
typedef void* pointer_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
+ _LIBCPP_HIDE_FROM_ABI explicit __builtin_new_deleter(size_t __size, size_t __align)
: __size_(__size), __align_(__align) {}
_LIBCPP_HIDE_FROM_ABI void operator()(void* __p) const _NOEXCEPT {
diff --git a/libcxx/include/__cxx03/__memory/compressed_pair.h b/libcxx/include/__cxx03/__memory/compressed_pair.h
index 550aa7e62204d..601736a40cd8a 100644
--- a/libcxx/include/__cxx03/__memory/compressed_pair.h
+++ b/libcxx/include/__cxx03/__memory/compressed_pair.h
@@ -45,15 +45,14 @@ struct __compressed_pair_elem {
using reference = _Tp&;
using const_reference = const _Tp&;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(__default_init_tag) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(__value_init_tag) : __value_() {}
template <class _Up, __enable_if_t<!is_same<__compressed_pair_elem, __decay_t<_Up> >::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(_Up&& __u)
- : __value_(std::forward<_Up>(__u)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return __value_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI reference __get() _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI const_reference __get() const _NOEXCEPT { return __value_; }
private:
_Tp __value_;
@@ -66,16 +65,15 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
using const_reference = const _Tp&;
using __value_type = _Tp;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem() = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem() = default;
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(__default_init_tag) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}
template <class _Up, __enable_if_t<!is_same<__compressed_pair_elem, __decay_t<_Up> >::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(_Up&& __u)
- : __value_type(std::forward<_Up>(__u)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair_elem(_Up&& __u) : __value_type(std::forward<_Up>(__u)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
+ _LIBCPP_HIDE_FROM_ABI reference __get() _NOEXCEPT { return *this; }
+ _LIBCPP_HIDE_FROM_ABI const_reference __get() const _NOEXCEPT { return *this; }
};
template <class _T1, class _T2>
@@ -97,38 +95,32 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>, private __comp
__enable_if_t< __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
__dependent_type<is_default_constructible<_T2>, _Dummy>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair()
- : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
template <class _U1, class _U2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair(_U1&& __t1, _U2&& __t2)
+ _LIBCPP_HIDE_FROM_ABI explicit __compressed_pair(_U1&& __t1, _U2&& __t2)
: _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename _Base1::reference first() _NOEXCEPT {
- return static_cast<_Base1&>(*this).__get();
- }
+ _LIBCPP_HIDE_FROM_ABI typename _Base1::reference first() _NOEXCEPT { return static_cast<_Base1&>(*this).__get(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename _Base1::const_reference first() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI typename _Base1::const_reference first() const _NOEXCEPT {
return static_cast<_Base1 const&>(*this).__get();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename _Base2::reference second() _NOEXCEPT {
- return static_cast<_Base2&>(*this).__get();
- }
+ _LIBCPP_HIDE_FROM_ABI typename _Base2::reference second() _NOEXCEPT { return static_cast<_Base2&>(*this).__get(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename _Base2::const_reference second() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI typename _Base2::const_reference second() const _NOEXCEPT {
return static_cast<_Base2 const&>(*this).__get();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
return static_cast<_Base1*>(__pair);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
return static_cast<_Base2*>(__pair);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void swap(__compressed_pair& __x)
- _NOEXCEPT_(__is_nothrow_swappable_v<_T1>&& __is_nothrow_swappable_v<_T2>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__compressed_pair& __x) {
using std::swap;
swap(first(), __x.first());
swap(second(), __x.second());
@@ -136,9 +128,7 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>, private __comp
};
template <class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
-swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
- _NOEXCEPT_(__is_nothrow_swappable_v<_T1>&& __is_nothrow_swappable_v<_T2>) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/__memory/construct_at.h b/libcxx/include/__cxx03/__memory/construct_at.h
index b2f1a073fdc43..8d1089335de90 100644
--- a/libcxx/include/__cxx03/__memory/construct_at.h
+++ b/libcxx/include/__cxx03/__memory/construct_at.h
@@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// construct_at
template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
return _LIBCPP_ASSERT_NON_NULL(__location != nullptr, "null pointer given to construct_at"),
::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);
}
@@ -45,24 +45,23 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp* __construct_at(_Tp* __l
// taking an array).
template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator __destroy(_ForwardIterator, _ForwardIterator);
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator __destroy(_ForwardIterator, _ForwardIterator);
template <class _Tp, __enable_if_t<!is_array<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __destroy_at(_Tp* __loc) {
+_LIBCPP_HIDE_FROM_ABI void __destroy_at(_Tp* __loc) {
_LIBCPP_ASSERT_NON_NULL(__loc != nullptr, "null pointer given to destroy_at");
__loc->~_Tp();
}
template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
-__destroy(_ForwardIterator __first, _ForwardIterator __last) {
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
for (; __first != __last; ++__first)
std::__destroy_at(std::addressof(*__first));
return __first;
}
template <class _BidirectionalIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator
+_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__reverse_destroy(_BidirectionalIterator __first, _BidirectionalIterator __last) {
while (__last != __first) {
--__last;
diff --git a/libcxx/include/__cxx03/__memory/pointer_traits.h b/libcxx/include/__cxx03/__memory/pointer_traits.h
index b159515f9722a..d38004aca9dc4 100644
--- a/libcxx/include/__cxx03/__memory/pointer_traits.h
+++ b/libcxx/include/__cxx03/__memory/pointer_traits.h
@@ -124,7 +124,7 @@ struct __pointer_traits_impl<_Ptr, __void_t<typename __pointer_traits_element_ty
struct __nat {};
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ _LIBCPP_HIDE_FROM_ABI static pointer
pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) {
return pointer::pointer_to(__r);
}
@@ -148,7 +148,7 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> {
struct __nat {};
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ _LIBCPP_HIDE_FROM_ABI static pointer
pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT {
return std::addressof(__r);
}
@@ -163,7 +163,7 @@ template <class _Pointer, class = void>
struct __to_address_helper;
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __to_address(_Tp* __p) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp* __to_address(_Tp* __p) _NOEXCEPT {
static_assert(!is_function<_Tp>::value, "_Tp is a function type");
return __p;
}
@@ -188,16 +188,14 @@ struct _IsFancyPointer {
// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
template <class _Pointer, __enable_if_t< _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR __decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
+_LIBCPP_HIDE_FROM_ABI __decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
__to_address(const _Pointer& __p) _NOEXCEPT {
return __to_address_helper<_Pointer>::__call(__p);
}
template <class _Pointer, class>
struct __to_address_helper {
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR static decltype(std::__to_address(std::declval<const _Pointer&>().operator->()))
+ _LIBCPP_HIDE_FROM_ABI static decltype(std::__to_address(std::declval<const _Pointer&>().operator->()))
__call(const _Pointer& __p) _NOEXCEPT {
return std::__to_address(__p.operator->());
}
@@ -206,8 +204,7 @@ struct __to_address_helper {
template <class _Pointer>
struct __to_address_helper<_Pointer,
decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))> {
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR static decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
+ _LIBCPP_HIDE_FROM_ABI static decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
__call(const _Pointer& __p) _NOEXCEPT {
return pointer_traits<_Pointer>::to_address(__p);
}
diff --git a/libcxx/include/__cxx03/__memory/raw_storage_iterator.h b/libcxx/include/__cxx03/__memory/raw_storage_iterator.h
index 4d9facf513b5e..0157b663c975e 100644
--- a/libcxx/include/__cxx03/__memory/raw_storage_iterator.h
+++ b/libcxx/include/__cxx03/__memory/raw_storage_iterator.h
@@ -29,9 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _OutputIterator, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator
- : public iterator<output_iterator_tag, void, void, void, void>
-{
+class _LIBCPP_TEMPLATE_VIS raw_storage_iterator : public iterator<output_iterator_tag, void, void, void, void> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
private:
diff --git a/libcxx/include/__cxx03/__memory/shared_ptr.h b/libcxx/include/__cxx03/__memory/shared_ptr.h
index fce9e9942c5f3..fb94d9d55596f 100644
--- a/libcxx/include/__cxx03/__memory/shared_ptr.h
+++ b/libcxx/include/__cxx03/__memory/shared_ptr.h
@@ -401,9 +401,9 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
__shared_weak_count* __cntrl_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
+ _LIBCPP_HIDE_FROM_ABI shared_ptr() _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
+ _LIBCPP_HIDE_FROM_ABI shared_ptr(nullptr_t) _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
template <class _Yp, __enable_if_t< _And< __raw_pointer_compatible_with<_Yp, _Tp> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit shared_ptr(_Yp* __p) : __ptr_(__p) {
@@ -422,7 +422,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT> _CntrlBlk;
- __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
+ __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
__enable_weak_this(__p, __p);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
} catch (...) {
@@ -445,8 +445,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
typedef __allocator_destructor<_A2> _D2;
_A2 __a2(__a);
unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1));
- ::new ((void*)std::addressof(*__hold2.get()))
- _CntrlBlk(__p, __d, __a);
+ ::new ((void*)std::addressof(*__hold2.get())) _CntrlBlk(__p, __d, __a);
__cntrl_ = std::addressof(*__hold2.release());
__enable_weak_this(__p, __p);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
@@ -468,7 +467,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
typedef typename __shared_ptr_default_allocator<_Tp>::type _AllocT;
typedef __shared_ptr_pointer<nullptr_t, _Dp, _AllocT> _CntrlBlk;
- __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
+ __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
} catch (...) {
__d(__p);
@@ -662,7 +661,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
_LIBCPP_HIDE_FROM_ABI long use_count() const _NOEXCEPT { return __cntrl_ ? __cntrl_->use_count() : 0; }
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI bool unique() const _NOEXCEPT { return use_count() == 1; }
+ _LIBCPP_HIDE_FROM_ABI bool unique() const _NOEXCEPT { return use_count() == 1; }
_LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return get() != nullptr; }
@@ -893,7 +892,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr {
__shared_weak_count* __cntrl_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI weak_ptr() _NOEXCEPT;
template <class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI weak_ptr(shared_ptr<_Yp> const& __r) _NOEXCEPT;
@@ -943,7 +942,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr {
};
template <class _Tp>
-inline _LIBCPP_CONSTEXPR weak_ptr<_Tp>::weak_ptr() _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
+inline weak_ptr<_Tp>::weak_ptr() _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
template <class _Tp>
inline weak_ptr<_Tp>::weak_ptr(weak_ptr const& __r) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) {
@@ -1077,7 +1076,7 @@ class _LIBCPP_TEMPLATE_VIS enable_shared_from_this {
mutable weak_ptr<_Tp> __weak_this_;
protected:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR enable_shared_from_this() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI enable_shared_from_this() _NOEXCEPT {}
_LIBCPP_HIDE_FROM_ABI enable_shared_from_this(enable_shared_from_this const&) _NOEXCEPT {}
_LIBCPP_HIDE_FROM_ABI enable_shared_from_this& operator=(enable_shared_from_this const&) _NOEXCEPT { return *this; }
_LIBCPP_HIDE_FROM_ABI ~enable_shared_from_this() {}
@@ -1095,8 +1094,8 @@ struct _LIBCPP_TEMPLATE_VIS hash;
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> > {
- _LIBCPP_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t result_type;
+ typedef shared_ptr<_Tp> argument_type;
+ typedef size_t result_type;
_LIBCPP_HIDE_FROM_ABI size_t operator()(const shared_ptr<_Tp>& __ptr) const _NOEXCEPT {
return hash<typename shared_ptr<_Tp>::element_type*>()(__ptr.get());
@@ -1117,7 +1116,7 @@ class _LIBCPP_EXPORTED_FROM_ABI __sp_mut {
void unlock() _NOEXCEPT;
private:
- _LIBCPP_CONSTEXPR __sp_mut(void*) _NOEXCEPT;
+ __sp_mut(void*) _NOEXCEPT;
__sp_mut(const __sp_mut&);
__sp_mut& operator=(const __sp_mut&);
diff --git a/libcxx/include/__cxx03/__memory/swap_allocator.h b/libcxx/include/__cxx03/__memory/swap_allocator.h
index 7b82cef75e38a..8659145ece024 100644
--- a/libcxx/include/__cxx03/__memory/swap_allocator.h
+++ b/libcxx/include/__cxx03/__memory/swap_allocator.h
@@ -22,21 +22,16 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Alloc>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
- _NOEXCEPT_(__is_nothrow_swappable_v<_Alloc>)
-{
+_LIBCPP_HIDE_FROM_ABI void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type) {
using std::swap;
swap(__a1, __a2);
}
template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
-__swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}
+inline _LIBCPP_HIDE_FROM_ABI void __swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}
template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
- _NOEXCEPT_(__is_nothrow_swappable_v<_Alloc>)
-{
+inline _LIBCPP_HIDE_FROM_ABI void __swap_allocator(_Alloc& __a1, _Alloc& __a2) {
std::__swap_allocator(
__a1, __a2, integral_constant<bool, allocator_traits<_Alloc>::propagate_on_container_swap::value>());
}
diff --git a/libcxx/include/__cxx03/__memory/temp_value.h b/libcxx/include/__cxx03/__memory/temp_value.h
index 159f6a1df4066..b79c0a740d643 100644
--- a/libcxx/include/__cxx03/__memory/temp_value.h
+++ b/libcxx/include/__cxx03/__memory/temp_value.h
@@ -28,19 +28,16 @@ struct __temp_value {
typename aligned_storage<sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)>::type __v;
_Alloc& __a;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp* __addr() {
- return reinterpret_cast<_Tp*>(std::addressof(__v));
- }
+ _LIBCPP_HIDE_FROM_ABI _Tp* __addr() { return reinterpret_cast<_Tp*>(std::addressof(__v)); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& get() { return *__addr(); }
+ _LIBCPP_HIDE_FROM_ABI _Tp& get() { return *__addr(); }
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_CONSTEXPR_SINCE_CXX20 __temp_value(_Alloc& __alloc, _Args&&... __args)
- : __a(__alloc) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI __temp_value(_Alloc& __alloc, _Args&&... __args) : __a(__alloc) {
_Traits::construct(__a, __addr(), std::forward<_Args>(__args)...);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__temp_value() { _Traits::destroy(__a, __addr()); }
+ _LIBCPP_HIDE_FROM_ABI ~__temp_value() { _Traits::destroy(__a, __addr()); }
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__memory/temporary_buffer.h b/libcxx/include/__cxx03/__memory/temporary_buffer.h
index 3f584a7337f06..60c12379905c8 100644
--- a/libcxx/include/__cxx03/__memory/temporary_buffer.h
+++ b/libcxx/include/__cxx03/__memory/temporary_buffer.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17 pair<_Tp*, ptrdiff_t>
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
pair<_Tp*, ptrdiff_t> __r(0, 0);
const ptrdiff_t __m =
@@ -57,7 +57,7 @@ get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 void return_temporary_buffer(_Tp* __p) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void return_temporary_buffer(_Tp* __p) _NOEXCEPT {
std::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp));
}
diff --git a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
index ff9223d345b29..17c30b4fbdd72 100644
--- a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
@@ -48,7 +48,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __always_false {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(_Args&&...) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(_Args&&...) const _NOEXCEPT {
return false;
}
};
@@ -171,8 +171,7 @@ uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) {
// Destroy all elements in [__first, __last) from left to right using allocator destruction.
template <class _Alloc, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
+_LIBCPP_HIDE_FROM_ABI void __allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
for (; __first != __last; ++__first)
allocator_traits<_Alloc>::destroy(__alloc, std::__to_address(__first));
}
@@ -180,11 +179,10 @@ __allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
template <class _Alloc, class _Iter>
class _AllocatorDestroyRangeReverse {
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
- _AllocatorDestroyRangeReverse(_Alloc& __alloc, _Iter& __first, _Iter& __last)
+ _LIBCPP_HIDE_FROM_ABI _AllocatorDestroyRangeReverse(_Alloc& __alloc, _Iter& __first, _Iter& __last)
: __alloc_(__alloc), __first_(__first), __last_(__last) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void operator()() const {
+ _LIBCPP_HIDE_FROM_ABI void operator()() const {
std::__allocator_destroy(__alloc_, std::reverse_iterator<_Iter>(__last_), std::reverse_iterator<_Iter>(__first_));
}
@@ -199,7 +197,7 @@ class _AllocatorDestroyRangeReverse {
// The caller has to ensure that __first2 can hold at least N uninitialized elements. If an exception is thrown the
// already copied elements are destroyed in reverse order of their construction.
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
+_LIBCPP_HIDE_FROM_ABI _Iter2
__uninitialized_allocator_copy_impl(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
auto __destruct_first = __first2;
auto __guard =
@@ -229,8 +227,7 @@ template <class _Alloc,
is_same<__remove_const_t<_In>, __remove_const_t<_Out> >::value &&
__allocator_has_trivial_copy_construct<_Alloc, _RawTypeIn>::value,
int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Out*
-__uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out* __first2) {
+_LIBCPP_HIDE_FROM_ABI _Out* __uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out* __first2) {
// TODO: Remove the const_cast once we drop support for std::allocator<T const>
if (__libcpp_is_constant_evaluated()) {
while (__first1 != __last1) {
@@ -245,7 +242,7 @@ __uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out*
}
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
+_LIBCPP_HIDE_FROM_ABI _Iter2
__uninitialized_allocator_copy(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
auto __unwrapped_range = std::__unwrap_range(__first1, __last1);
auto __result = std::__uninitialized_allocator_copy_impl(
@@ -278,7 +275,7 @@ struct __allocator_has_trivial_destroy<allocator<_Tp>, _Up> : true_type {};
// - is_copy_constructible<_Tp>
// - __libcpp_is_trivially_relocatable<_Tp>
template <class _Alloc, class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_HIDE_FROM_ABI void
__uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _Tp* __result) {
static_assert(__is_cpp17_move_insertable<_Alloc>::value,
"The specified type does not meet the requirements of Cpp17MoveInsertable");
diff --git a/libcxx/include/__cxx03/__memory/unique_ptr.h b/libcxx/include/__cxx03/__memory/unique_ptr.h
index 0452b70b37144..2a9b330ec0d39 100644
--- a/libcxx/include/__cxx03/__memory/unique_ptr.h
+++ b/libcxx/include/__cxx03/__memory/unique_ptr.h
@@ -54,9 +54,9 @@ struct _LIBCPP_TEMPLATE_VIS default_delete {
static_assert(!is_function<_Tp>::value, "default_delete cannot be instantiated for function types");
_LIBCPP_HIDE_FROM_ABI default_delete() {}
template <class _Up, __enable_if_t<is_convertible<_Up*, _Tp*>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 default_delete(const default_delete<_Up>&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI default_delete(const default_delete<_Up>&) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void operator()(_Tp* __ptr) const _NOEXCEPT {
static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
delete __ptr;
@@ -73,12 +73,11 @@ struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> {
_LIBCPP_HIDE_FROM_ABI default_delete() {}
template <class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
+ _LIBCPP_HIDE_FROM_ABI
default_delete(const default_delete<_Up[]>&, typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}
template <class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename _EnableIfConvertible<_Up>::type
- operator()(_Up* __ptr) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI typename _EnableIfConvertible<_Up>::type operator()(_Up* __ptr) const _NOEXCEPT {
static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type");
delete[] __ptr;
}
@@ -167,44 +166,40 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
public:
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT
- : __ptr_(__value_init_tag(), __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(__p, __d) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, __d) {}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(__p, std::move(__d)) {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, std::move(__d)) {
static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> > >
_LIBCPP_HIDE_FROM_ABI unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(unique_ptr&& __u) _NOEXCEPT
: __ptr_(__u.release(), std::forward<deleter_type>(__u.get_deleter())) {}
template <class _Up,
class _Ep,
class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
class = _EnableIfDeleterConvertible<_Ep> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
: __ptr_(__u.release(), std::forward<_Ep>(__u.get_deleter())) {}
template <class _Up,
__enable_if_t<is_convertible<_Up*, _Tp*>::value && is_same<_Dp, default_delete<_Tp> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI unique_ptr(auto_ptr<_Up>&& __p) _NOEXCEPT : __ptr_(__p.release(), __value_init_tag()) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = std::forward<deleter_type>(__u.get_deleter());
return *this;
@@ -214,7 +209,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
class _Ep,
class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
class = _EnableIfDeleterAssignable<_Ep> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = std::forward<_Ep>(__u.get_deleter());
return *this;
@@ -230,41 +225,34 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
unique_ptr(unique_ptr const&) = delete;
unique_ptr& operator=(unique_ptr const&) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
+ _LIBCPP_HIDE_FROM_ABI ~unique_ptr() { reset(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(nullptr_t) _NOEXCEPT {
reset();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp> operator*() const
- _NOEXCEPT_(__is_noexcept_deref_or_void<pointer>::value) {
- return *__ptr_.first();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer operator->() const _NOEXCEPT { return __ptr_.first(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT { return __ptr_.second(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
- return __ptr_.second();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
- return __ptr_.first() != nullptr;
- }
+ _LIBCPP_HIDE_FROM_ABI __add_lvalue_reference_t<_Tp> operator*() const { return *__ptr_.first(); }
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const _NOEXCEPT { return __ptr_.first(); }
+ _LIBCPP_HIDE_FROM_ABI pointer get() const _NOEXCEPT { return __ptr_.first(); }
+ _LIBCPP_HIDE_FROM_ABI deleter_type& get_deleter() _NOEXCEPT { return __ptr_.second(); }
+ _LIBCPP_HIDE_FROM_ABI const deleter_type& get_deleter() const _NOEXCEPT { return __ptr_.second(); }
+ _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __ptr_.first() != nullptr; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI pointer release() _NOEXCEPT {
pointer __t = __ptr_.first();
__ptr_.first() = pointer();
return __t;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(pointer __p = pointer()) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void reset(pointer __p = pointer()) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = __p;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT { __ptr_.swap(__u.__ptr_); }
+ _LIBCPP_HIDE_FROM_ABI void swap(unique_ptr& __u) _NOEXCEPT { __ptr_.swap(__u.__ptr_); }
};
template <class _Tp, class _Dp>
@@ -335,41 +323,36 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
public:
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT
- : __ptr_(__value_init_tag(), __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
template <class _Pp,
bool _Dummy = true,
class = _EnableIfDeleterDefaultConstructible<_Dummy>,
class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(_Pp __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI explicit unique_ptr(_Pp __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
template <class _Pp,
bool _Dummy = true,
class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> >,
class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(__p, __d) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, __d) {}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(nullptr, __d) {}
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(nullptr, __d) {}
template <class _Pp,
bool _Dummy = true,
class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> >,
class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(__p, std::move(__d)) {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, std::move(__d)) {
static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(nullptr, std::move(__d)) {
static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
}
@@ -380,10 +363,10 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
class = _EnableIfPointerConvertible<_Pp> >
_LIBCPP_HIDE_FROM_ABI unique_ptr(_Pp __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(unique_ptr&& __u) _NOEXCEPT
: __ptr_(__u.release(), std::forward<deleter_type>(__u.get_deleter())) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = std::forward<deleter_type>(__u.get_deleter());
return *this;
@@ -393,14 +376,14 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
class _Ep,
class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
class = _EnableIfDeleterConvertible<_Ep> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
: __ptr_(__u.release(), std::forward<_Ep>(__u.get_deleter())) {}
template <class _Up,
class _Ep,
class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
class = _EnableIfDeleterAssignable<_Ep> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = std::forward<_Ep>(__u.get_deleter());
return *this;
@@ -410,60 +393,52 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
unique_ptr& operator=(unique_ptr const&) = delete;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
+ _LIBCPP_HIDE_FROM_ABI ~unique_ptr() { reset(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI unique_ptr& operator=(nullptr_t) _NOEXCEPT {
reset();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp> operator[](size_t __i) const {
- return __ptr_.first()[__i];
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }
+ _LIBCPP_HIDE_FROM_ABI __add_lvalue_reference_t<_Tp> operator[](size_t __i) const { return __ptr_.first()[__i]; }
+ _LIBCPP_HIDE_FROM_ABI pointer get() const _NOEXCEPT { return __ptr_.first(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT { return __ptr_.second(); }
+ _LIBCPP_HIDE_FROM_ABI deleter_type& get_deleter() _NOEXCEPT { return __ptr_.second(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
- return __ptr_.second();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
- return __ptr_.first() != nullptr;
- }
+ _LIBCPP_HIDE_FROM_ABI const deleter_type& get_deleter() const _NOEXCEPT { return __ptr_.second(); }
+ _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __ptr_.first() != nullptr; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI pointer release() _NOEXCEPT {
pointer __t = __ptr_.first();
__ptr_.first() = pointer();
return __t;
}
template <class _Pp, __enable_if_t<_CheckArrayPointerConversion<_Pp>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(_Pp __p) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void reset(_Pp __p) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = __p;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(nullptr_t = nullptr) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void reset(nullptr_t = nullptr) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = nullptr;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT { __ptr_.swap(__u.__ptr_); }
+ _LIBCPP_HIDE_FROM_ABI void swap(unique_ptr& __u) _NOEXCEPT { __ptr_.swap(__u.__ptr_); }
};
template <class _Tp, class _Dp, __enable_if_t<__is_swappable_v<_Dp>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {
__x.swap(__y);
}
template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
-operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
return __x.get() == __y.get();
}
@@ -496,8 +471,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const unique_ptr<_T1, _D1>& __x, co
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
-operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT {
return !__x;
}
@@ -517,44 +491,44 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(nullptr_t, const unique_ptr<_T1, _D
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
typedef typename unique_ptr<_T1, _D1>::pointer _P1;
return less<_P1>()(__x.get(), nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
typedef typename unique_ptr<_T1, _D1>::pointer _P1;
return less<_P1>()(nullptr, __x.get());
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
return nullptr < __x;
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
return __x < nullptr;
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
return !(nullptr < __x);
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
return !(__x < nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
return !(__x < nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
return !(nullptr < __x);
}
@@ -563,8 +537,8 @@ struct _LIBCPP_TEMPLATE_VIS hash;
template <class _Tp, class _Dp>
struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> > {
- _LIBCPP_DEPRECATED_IN_CXX17 typedef unique_ptr<_Tp, _Dp> argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t result_type;
+ typedef unique_ptr<_Tp, _Dp> argument_type;
+ typedef size_t result_type;
_LIBCPP_HIDE_FROM_ABI size_t operator()(const unique_ptr<_Tp, _Dp>& __ptr) const {
typedef typename unique_ptr<_Tp, _Dp>::pointer pointer;
diff --git a/libcxx/include/__cxx03/__memory/voidify.h b/libcxx/include/__cxx03/__memory/voidify.h
index 63e03b7d7f8f8..842fb8d4e7a0f 100644
--- a/libcxx/include/__cxx03/__memory/voidify.h
+++ b/libcxx/include/__cxx03/__memory/voidify.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Tp>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void* __voidify(_Tp& __from) {
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI void* __voidify(_Tp& __from) {
// Cast away cv-qualifiers to allow modifying elements of a range through const iterators.
return const_cast<void*>(static_cast<const volatile void*>(std::addressof(__from)));
}
diff --git a/libcxx/include/__cxx03/__mutex/mutex.h b/libcxx/include/__cxx03/__mutex/mutex.h
index 46c7546f77e32..644131a047fa1 100644
--- a/libcxx/include/__cxx03/__mutex/mutex.h
+++ b/libcxx/include/__cxx03/__mutex/mutex.h
@@ -25,7 +25,7 @@ class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mut
__libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR mutex() = default;
+ _LIBCPP_HIDE_FROM_ABI mutex() = default;
mutex(const mutex&) = delete;
mutex& operator=(const mutex&) = delete;
diff --git a/libcxx/include/__cxx03/__mutex/once_flag.h b/libcxx/include/__cxx03/__mutex/once_flag.h
index 0345bfab8184b..eaeaa6121bff8 100644
--- a/libcxx/include/__cxx03/__mutex/once_flag.h
+++ b/libcxx/include/__cxx03/__mutex/once_flag.h
@@ -36,7 +36,7 @@ template <class _Callable>
_LIBCPP_HIDE_FROM_ABI void call_once(once_flag&, const _Callable&);
struct _LIBCPP_TEMPLATE_VIS once_flag {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR once_flag() _NOEXCEPT : __state_(_Unset) {}
+ _LIBCPP_HIDE_FROM_ABI once_flag() _NOEXCEPT : __state_(_Unset) {}
once_flag(const once_flag&) = delete;
once_flag& operator=(const once_flag&) = delete;
diff --git a/libcxx/include/__cxx03/__numeric/accumulate.h b/libcxx/include/__cxx03/__numeric/accumulate.h
index 3ac3419201442..0b1a0a9bf9d15 100644
--- a/libcxx/include/__cxx03/__numeric/accumulate.h
+++ b/libcxx/include/__cxx03/__numeric/accumulate.h
@@ -23,15 +23,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp
-accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) {
+_LIBCPP_HIDE_FROM_ABI _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) {
for (; __first != __last; ++__first)
__init = __init + *__first;
return __init;
}
template <class _InputIterator, class _Tp, class _BinaryOperation>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp
+_LIBCPP_HIDE_FROM_ABI _Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) {
for (; __first != __last; ++__first)
__init = __binary_op(__init, *__first);
diff --git a/libcxx/include/__cxx03/__numeric/adjacent_difference.h b/libcxx/include/__cxx03/__numeric/adjacent_difference.h
index 4fd33cabde8aa..90ef7af1543f8 100644
--- a/libcxx/include/__cxx03/__numeric/adjacent_difference.h
+++ b/libcxx/include/__cxx03/__numeric/adjacent_difference.h
@@ -24,7 +24,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
if (__first != __last) {
typename iterator_traits<_InputIterator>::value_type __acc(*__first);
@@ -32,14 +32,14 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
for (++__first, (void)++__result; __first != __last; ++__first, (void)++__result) {
typename iterator_traits<_InputIterator>::value_type __val(*__first);
*__result = __val - __acc;
- __acc = std::move(__val);
+ __acc = std::move(__val);
}
}
return __result;
}
template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator adjacent_difference(
+_LIBCPP_HIDE_FROM_ABI _OutputIterator adjacent_difference(
_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) {
if (__first != __last) {
typename iterator_traits<_InputIterator>::value_type __acc(*__first);
@@ -47,7 +47,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator adjacent_dif
for (++__first, (void)++__result; __first != __last; ++__first, (void)++__result) {
typename iterator_traits<_InputIterator>::value_type __val(*__first);
*__result = __binary_op(__val, __acc);
- __acc = std::move(__val);
+ __acc = std::move(__val);
}
}
return __result;
diff --git a/libcxx/include/__cxx03/__numeric/inner_product.h b/libcxx/include/__cxx03/__numeric/inner_product.h
index 0d8483a836fba..39e09ba005e40 100644
--- a/libcxx/include/__cxx03/__numeric/inner_product.h
+++ b/libcxx/include/__cxx03/__numeric/inner_product.h
@@ -23,7 +23,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp
+_LIBCPP_HIDE_FROM_ABI _Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) {
for (; __first1 != __last1; ++__first1, (void)++__first2)
__init = __init + *__first1 * *__first2;
@@ -31,7 +31,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
}
template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp inner_product(
+_LIBCPP_HIDE_FROM_ABI _Tp inner_product(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/libcxx/include/__cxx03/__numeric/iota.h b/libcxx/include/__cxx03/__numeric/iota.h
index f97c124700ae8..3b1f70eef33da 100644
--- a/libcxx/include/__cxx03/__numeric/iota.h
+++ b/libcxx/include/__cxx03/__numeric/iota.h
@@ -19,8 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) {
+_LIBCPP_HIDE_FROM_ABI void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) {
for (; __first != __last; ++__first, (void)++__value)
*__first = __value;
}
diff --git a/libcxx/include/__cxx03/__numeric/partial_sum.h b/libcxx/include/__cxx03/__numeric/partial_sum.h
index da540fa34dc8e..e60f85069e542 100644
--- a/libcxx/include/__cxx03/__numeric/partial_sum.h
+++ b/libcxx/include/__cxx03/__numeric/partial_sum.h
@@ -24,13 +24,13 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
if (__first != __last) {
typename iterator_traits<_InputIterator>::value_type __t(*__first);
*__result = __t;
for (++__first, (void)++__result; __first != __last; ++__first, (void)++__result) {
- __t = __t + *__first;
+ __t = __t + *__first;
*__result = __t;
}
}
@@ -38,13 +38,13 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
}
template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) {
if (__first != __last) {
typename iterator_traits<_InputIterator>::value_type __t(*__first);
*__result = __t;
for (++__first, (void)++__result; __first != __last; ++__first, (void)++__result) {
- __t = __binary_op(__t, *__first);
+ __t = __binary_op(__t, *__first);
*__result = __t;
}
}
diff --git a/libcxx/include/__cxx03/__random/clamp_to_integral.h b/libcxx/include/__cxx03/__random/clamp_to_integral.h
index be89db8c6a807..baa1ca636a2b3 100644
--- a/libcxx/include/__cxx03/__random/clamp_to_integral.h
+++ b/libcxx/include/__cxx03/__random/clamp_to_integral.h
@@ -26,7 +26,7 @@ template <class _IntT,
class _FloatT,
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _IntT __max_representable_int_for_float() _NOEXCEPT {
static_assert(is_floating_point<_FloatT>::value, "must be a floating point type");
static_assert(is_integral<_IntT>::value, "must be an integral type");
static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
diff --git a/libcxx/include/__cxx03/__random/discard_block_engine.h b/libcxx/include/__cxx03/__random/discard_block_engine.h
index 15bdbbbd5934f..c7e8d902262d6 100644
--- a/libcxx/include/__cxx03/__random/discard_block_engine.h
+++ b/libcxx/include/__cxx03/__random/discard_block_engine.h
@@ -40,14 +40,14 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine {
typedef typename _Engine::result_type result_type;
// engine characteristics
- static _LIBCPP_CONSTEXPR const size_t block_size = __p;
- static _LIBCPP_CONSTEXPR const size_t used_block = __r;
+ static const size_t block_size = __p;
+ static const size_t used_block = __r;
static const result_type _Min = _Engine::_Min;
static const result_type _Max = _Engine::_Max;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Engine::min(); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Engine::max(); }
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Engine::min(); }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Engine::max(); }
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI discard_block_engine() : __n_(0) {}
@@ -100,10 +100,10 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine {
};
template <class _Engine, size_t __p, size_t __r>
-_LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size;
+const size_t discard_block_engine<_Engine, __p, __r>::block_size;
template <class _Engine, size_t __p, size_t __r>
-_LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block;
+const size_t discard_block_engine<_Engine, __p, __r>::used_block;
template <class _Engine, size_t __p, size_t __r>
typename discard_block_engine<_Engine, __p, __r>::result_type discard_block_engine<_Engine, __p, __r>::operator()() {
diff --git a/libcxx/include/__cxx03/__random/independent_bits_engine.h b/libcxx/include/__cxx03/__random/independent_bits_engine.h
index 8c04cf2c2b96b..ba7c2c7f67c1c 100644
--- a/libcxx/include/__cxx03/__random/independent_bits_engine.h
+++ b/libcxx/include/__cxx03/__random/independent_bits_engine.h
@@ -34,13 +34,13 @@ template <class _Engine, size_t __w, class _UIntType>
class _LIBCPP_TEMPLATE_VIS independent_bits_engine {
template <class _UInt, _UInt _R0, size_t _Wp, size_t _Mp>
class __get_n {
- static _LIBCPP_CONSTEXPR const size_t _Dt = numeric_limits<_UInt>::digits;
- static _LIBCPP_CONSTEXPR const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
- static _LIBCPP_CONSTEXPR const size_t _W0 = _Wp / _Np;
- static _LIBCPP_CONSTEXPR const _UInt _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
+ static const size_t _Dt = numeric_limits<_UInt>::digits;
+ static const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
+ static const size_t _W0 = _Wp / _Np;
+ static const _UInt _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
public:
- static _LIBCPP_CONSTEXPR const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
+ static const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
};
public:
@@ -50,36 +50,35 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine {
private:
_Engine __e_;
- static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+ static const result_type _Dt = numeric_limits<result_type>::digits;
static_assert(0 < __w, "independent_bits_engine invalid parameters");
static_assert(__w <= _Dt, "independent_bits_engine invalid parameters");
typedef typename _Engine::result_type _Engine_result_type;
typedef __conditional_t<sizeof(_Engine_result_type) <= sizeof(result_type), result_type, _Engine_result_type>
_Working_result_type;
- static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min + _Working_result_type(1);
- static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
- static _LIBCPP_CONSTEXPR const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
- static _LIBCPP_CONSTEXPR const size_t __w0 = __w / __n;
- static _LIBCPP_CONSTEXPR const size_t __n0 = __n - __w % __n;
- static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
- static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
- static _LIBCPP_CONSTEXPR const _Working_result_type __y0 = __w0 >= _WDt ? 0 : (_Rp >> __w0) << __w0;
- static _LIBCPP_CONSTEXPR const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 : (_Rp >> (__w0 + 1)) << (__w0 + 1);
- static _LIBCPP_CONSTEXPR const
- _Engine_result_type __mask0 = __w0 > 0 ? _Engine_result_type(~0) >> (_EDt - __w0) : _Engine_result_type(0);
- static _LIBCPP_CONSTEXPR const _Engine_result_type __mask1 =
- __w0 < _EDt - 1 ? _Engine_result_type(~0) >> (_EDt - (__w0 + 1)) : _Engine_result_type(~0);
+ static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min + _Working_result_type(1);
+ static const size_t __m = __log2<_Working_result_type, _Rp>::value;
+ static const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
+ static const size_t __w0 = __w / __n;
+ static const size_t __n0 = __n - __w % __n;
+ static const size_t _WDt = numeric_limits<_Working_result_type>::digits;
+ static const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
+ static const _Working_result_type __y0 = __w0 >= _WDt ? 0 : (_Rp >> __w0) << __w0;
+ static const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 : (_Rp >> (__w0 + 1)) << (__w0 + 1);
+ static const _Engine_result_type
+ __mask0 = __w0 > 0 ? _Engine_result_type(~0) >> (_EDt - __w0) : _Engine_result_type(0);
+ static const _Engine_result_type
+ __mask1 = __w0 < _EDt - 1 ? _Engine_result_type(~0) >> (_EDt - (__w0 + 1)) : _Engine_result_type(~0);
public:
- static _LIBCPP_CONSTEXPR const result_type _Min = 0;
- static _LIBCPP_CONSTEXPR const result_type _Max =
- __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
+ static const result_type _Min = 0;
+ static const result_type _Max = __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
static_assert(_Min < _Max, "independent_bits_engine invalid parameters");
// engine characteristics
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI independent_bits_engine() {}
diff --git a/libcxx/include/__cxx03/__random/is_seed_sequence.h b/libcxx/include/__cxx03/__random/is_seed_sequence.h
index ddb9c83bb7081..da73fb478af60 100644
--- a/libcxx/include/__cxx03/__random/is_seed_sequence.h
+++ b/libcxx/include/__cxx03/__random/is_seed_sequence.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Sseq, class _Engine>
struct __is_seed_sequence {
- static _LIBCPP_CONSTEXPR const bool value =
+ static const bool value =
!is_convertible<_Sseq, typename _Engine::result_type>::value && !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
};
diff --git a/libcxx/include/__cxx03/__random/linear_congruential_engine.h b/libcxx/include/__cxx03/__random/linear_congruential_engine.h
index 100521c202e84..7e62a2a27497b 100644
--- a/libcxx/include/__cxx03/__random/linear_congruential_engine.h
+++ b/libcxx/include/__cxx03/__random/linear_congruential_engine.h
@@ -42,11 +42,7 @@ template <unsigned long long __a,
bool _Part = (!_HasOverflow || __m - 1ull <= _Mp / __a), // (a * x) % m works
bool _Schrage = (_HasOverflow && __m % __a <= __m / __a)> // r <= q
struct __lce_alg_picker {
- static _LIBCPP_CONSTEXPR const __lce_alg_type __mode =
- _Full ? _LCE_Full
- : _Part ? _LCE_Part
- : _Schrage ? _LCE_Schrage
- : _LCE_Promote;
+ static const __lce_alg_type __mode = _Full ? _LCE_Full : _Part ? _LCE_Part : _Schrage ? _LCE_Schrage : _LCE_Promote;
#ifdef _LIBCPP_HAS_NO_INT128
static_assert(_Mp != (unsigned long long)(-1) || _Full || _Part || _Schrage,
@@ -239,24 +235,24 @@ class _LIBCPP_TEMPLATE_VIS linear_congruential_engine {
private:
result_type __x_;
- static _LIBCPP_CONSTEXPR const result_type _Mp = result_type(-1);
+ static const result_type _Mp = result_type(-1);
static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters");
static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
static_assert(is_unsigned<_UIntType>::value, "_UIntType must be unsigned type");
public:
- static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u : 0u;
- static _LIBCPP_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
+ static const result_type _Min = __c == 0u ? 1u : 0u;
+ static const result_type _Max = __m - _UIntType(1u);
static_assert(_Min < _Max, "linear_congruential_engine invalid parameters");
// engine characteristics
- static _LIBCPP_CONSTEXPR const result_type multiplier = __a;
- static _LIBCPP_CONSTEXPR const result_type increment = __c;
- static _LIBCPP_CONSTEXPR const result_type modulus = __m;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
- static _LIBCPP_CONSTEXPR const result_type default_seed = 1u;
+ static const result_type multiplier = __a;
+ static const result_type increment = __c;
+ static const result_type modulus = __m;
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
+ static const result_type default_seed = 1u;
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI explicit linear_congruential_engine(result_type __s = default_seed) { seed(__s); }
@@ -314,19 +310,19 @@ class _LIBCPP_TEMPLATE_VIS linear_congruential_engine {
};
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-_LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-_LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-_LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-_LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
diff --git a/libcxx/include/__cxx03/__random/mersenne_twister_engine.h b/libcxx/include/__cxx03/__random/mersenne_twister_engine.h
index 404b15c3b0766..2392568b89bdf 100644
--- a/libcxx/include/__cxx03/__random/mersenne_twister_engine.h
+++ b/libcxx/include/__cxx03/__random/mersenne_twister_engine.h
@@ -144,7 +144,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine {
static_assert(0 < __m, "mersenne_twister_engine invalid parameters");
static_assert(__m <= __n, "mersenne_twister_engine invalid parameters");
- static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+ static const result_type _Dt = numeric_limits<result_type>::digits;
static_assert(__w <= _Dt, "mersenne_twister_engine invalid parameters");
static_assert(2 <= __w, "mersenne_twister_engine invalid parameters");
static_assert(__r <= __w, "mersenne_twister_engine invalid parameters");
@@ -154,9 +154,8 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine {
static_assert(__l <= __w, "mersenne_twister_engine invalid parameters");
public:
- static _LIBCPP_CONSTEXPR const result_type _Min = 0;
- static _LIBCPP_CONSTEXPR const result_type _Max =
- __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
+ static const result_type _Min = 0;
+ static const result_type _Max = __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
static_assert(_Min < _Max, "mersenne_twister_engine invalid parameters");
static_assert(__a <= _Max, "mersenne_twister_engine invalid parameters");
static_assert(__b <= _Max, "mersenne_twister_engine invalid parameters");
@@ -165,22 +164,22 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine {
static_assert(__f <= _Max, "mersenne_twister_engine invalid parameters");
// engine characteristics
- static _LIBCPP_CONSTEXPR const size_t word_size = __w;
- static _LIBCPP_CONSTEXPR const size_t state_size = __n;
- static _LIBCPP_CONSTEXPR const size_t shift_size = __m;
- static _LIBCPP_CONSTEXPR const size_t mask_bits = __r;
- static _LIBCPP_CONSTEXPR const result_type xor_mask = __a;
- static _LIBCPP_CONSTEXPR const size_t tempering_u = __u;
- static _LIBCPP_CONSTEXPR const result_type tempering_d = __d;
- static _LIBCPP_CONSTEXPR const size_t tempering_s = __s;
- static _LIBCPP_CONSTEXPR const result_type tempering_b = __b;
- static _LIBCPP_CONSTEXPR const size_t tempering_t = __t;
- static _LIBCPP_CONSTEXPR const result_type tempering_c = __c;
- static _LIBCPP_CONSTEXPR const size_t tempering_l = __l;
- static _LIBCPP_CONSTEXPR const result_type initialization_multiplier = __f;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
- static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u;
+ static const size_t word_size = __w;
+ static const size_t state_size = __n;
+ static const size_t shift_size = __m;
+ static const size_t mask_bits = __r;
+ static const result_type xor_mask = __a;
+ static const size_t tempering_u = __u;
+ static const result_type tempering_d = __d;
+ static const size_t tempering_s = __s;
+ static const result_type tempering_b = __b;
+ static const size_t tempering_t = __t;
+ static const result_type tempering_c = __c;
+ static const size_t tempering_l = __l;
+ static const result_type initialization_multiplier = __f;
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
+ static const result_type default_seed = 5489u;
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI explicit mersenne_twister_engine(result_type __sd = default_seed) { seed(__sd); }
@@ -318,7 +317,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::word_size;
template <class _UIntType,
@@ -335,7 +334,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::state_size;
template <class _UIntType,
@@ -352,7 +351,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::shift_size;
template <class _UIntType,
@@ -369,7 +368,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mask_bits;
template <class _UIntType,
@@ -386,22 +385,9 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::xor_mask;
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::xor_mask;
template <class _UIntType,
size_t __w,
@@ -417,7 +403,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_u;
template <class _UIntType,
@@ -434,22 +420,9 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_d;
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ tempering_d;
template <class _UIntType,
size_t __w,
@@ -465,7 +438,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_s;
template <class _UIntType,
@@ -482,22 +455,9 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_b;
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ tempering_b;
template <class _UIntType,
size_t __w,
@@ -513,7 +473,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_t;
template <class _UIntType,
@@ -530,22 +490,9 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_c;
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ tempering_c;
template <class _UIntType,
size_t __w,
@@ -561,7 +508,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const size_t
+const size_t
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_l;
template <class _UIntType,
@@ -578,22 +525,8 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
initialization_multiplier;
template <class _UIntType,
@@ -610,22 +543,9 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-_LIBCPP_CONSTEXPR const typename mersenne_twister_engine<
- _UIntType,
- __w,
- __n,
- __m,
- __r,
- __a,
- __u,
- __d,
- __s,
- __b,
- __t,
- __c,
- __l,
- __f>::result_type
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::default_seed;
+const typename mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::
+ default_seed;
template <class _UIntType,
size_t __w,
diff --git a/libcxx/include/__cxx03/__random/random_device.h b/libcxx/include/__cxx03/__random/random_device.h
index 0e8b3f3366d8d..f898c072b023e 100644
--- a/libcxx/include/__cxx03/__random/random_device.h
+++ b/libcxx/include/__cxx03/__random/random_device.h
@@ -47,11 +47,11 @@ class _LIBCPP_EXPORTED_FROM_ABI random_device {
typedef unsigned result_type;
// generator characteristics
- static _LIBCPP_CONSTEXPR const result_type _Min = 0;
- static _LIBCPP_CONSTEXPR const result_type _Max = 0xFFFFFFFFu;
+ static const result_type _Min = 0;
+ static const result_type _Max = 0xFFFFFFFFu;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
// constructors
explicit random_device(const string& __token = "/dev/urandom");
diff --git a/libcxx/include/__cxx03/__random/shuffle_order_engine.h b/libcxx/include/__cxx03/__random/shuffle_order_engine.h
index ba0b49ea026e4..3d2a14f26d379 100644
--- a/libcxx/include/__cxx03/__random/shuffle_order_engine.h
+++ b/libcxx/include/__cxx03/__random/shuffle_order_engine.h
@@ -31,22 +31,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <uint64_t _Xp, uint64_t _Yp>
struct __ugcd {
- static _LIBCPP_CONSTEXPR const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
+ static const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
};
template <uint64_t _Xp>
struct __ugcd<_Xp, 0> {
- static _LIBCPP_CONSTEXPR const uint64_t value = _Xp;
+ static const uint64_t value = _Xp;
};
template <uint64_t _Np, uint64_t _Dp>
class __uratio {
static_assert(_Dp != 0, "__uratio divide by 0");
- static _LIBCPP_CONSTEXPR const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
+ static const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
public:
- static _LIBCPP_CONSTEXPR const uint64_t num = _Np / __gcd;
- static _LIBCPP_CONSTEXPR const uint64_t den = _Dp / __gcd;
+ static const uint64_t num = _Np / __gcd;
+ static const uint64_t den = _Dp / __gcd;
typedef __uratio<num, den> type;
};
@@ -66,15 +66,15 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine {
public:
// engine characteristics
- static _LIBCPP_CONSTEXPR const size_t table_size = __k;
+ static const size_t table_size = __k;
static const result_type _Min = _Engine::_Min;
static const result_type _Max = _Engine::_Max;
static_assert(_Min < _Max, "shuffle_order_engine invalid parameters");
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
- static _LIBCPP_CONSTEXPR const unsigned long long _Rp = _Max - _Min + 1ull;
+ static const unsigned long long _Rp = _Max - _Min + 1ull;
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI shuffle_order_engine() { __init(); }
@@ -166,7 +166,7 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine {
};
template <class _Engine, size_t __k>
-_LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
+const size_t shuffle_order_engine<_Engine, __k>::table_size;
template <class _Eng, size_t _Kp>
_LIBCPP_HIDE_FROM_ABI bool
diff --git a/libcxx/include/__cxx03/__random/subtract_with_carry_engine.h b/libcxx/include/__cxx03/__random/subtract_with_carry_engine.h
index 84aea22060cc7..1e38f30643b97 100644
--- a/libcxx/include/__cxx03/__random/subtract_with_carry_engine.h
+++ b/libcxx/include/__cxx03/__random/subtract_with_carry_engine.h
@@ -58,25 +58,24 @@ class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine {
result_type __c_;
size_t __i_;
- static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+ static const result_type _Dt = numeric_limits<result_type>::digits;
static_assert(0 < __w, "subtract_with_carry_engine invalid parameters");
static_assert(__w <= _Dt, "subtract_with_carry_engine invalid parameters");
static_assert(0 < __s, "subtract_with_carry_engine invalid parameters");
static_assert(__s < __r, "subtract_with_carry_engine invalid parameters");
public:
- static _LIBCPP_CONSTEXPR const result_type _Min = 0;
- static _LIBCPP_CONSTEXPR const result_type _Max =
- __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
+ static const result_type _Min = 0;
+ static const result_type _Max = __w == _Dt ? result_type(~0) : (result_type(1) << __w) - result_type(1);
static_assert(_Min < _Max, "subtract_with_carry_engine invalid parameters");
// engine characteristics
- static _LIBCPP_CONSTEXPR const size_t word_size = __w;
- static _LIBCPP_CONSTEXPR const size_t short_lag = __s;
- static _LIBCPP_CONSTEXPR const size_t long_lag = __r;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
- static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u;
+ static const size_t word_size = __w;
+ static const size_t short_lag = __s;
+ static const size_t long_lag = __r;
+ _LIBCPP_HIDE_FROM_ABI static result_type min() { return _Min; }
+ _LIBCPP_HIDE_FROM_ABI static result_type max() { return _Max; }
+ static const result_type default_seed = 19780503u;
// constructors and seeding functions
_LIBCPP_HIDE_FROM_ABI explicit subtract_with_carry_engine(result_type __sd = default_seed) { seed(__sd); }
@@ -125,16 +124,16 @@ class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine {
};
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-_LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
+const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-_LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
+const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-_LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
+const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-_LIBCPP_CONSTEXPR const typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::result_type
+const typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::result_type
subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed;
template <class _UIntType, size_t __w, size_t __s, size_t __r>
diff --git a/libcxx/include/__cxx03/__random/uniform_int_distribution.h b/libcxx/include/__cxx03/__random/uniform_int_distribution.h
index 554577489733c..94e3899f6a5a5 100644
--- a/libcxx/include/__cxx03/__random/uniform_int_distribution.h
+++ b/libcxx/include/__cxx03/__random/uniform_int_distribution.h
@@ -51,9 +51,9 @@ class __independent_bits_engine {
_Engine_result_type __mask1_;
static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min + _Working_result_type(1);
- static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
- static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
- static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
+ static const size_t __m = __log2<_Working_result_type, _Rp>::value;
+ static const size_t _WDt = numeric_limits<_Working_result_type>::digits;
+ static const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
public:
// constructors and seeding functions
diff --git a/libcxx/include/__cxx03/__split_buffer b/libcxx/include/__cxx03/__split_buffer
index c614704ce56b0..1e67cc935e35b 100644
--- a/libcxx/include/__cxx03/__split_buffer
+++ b/libcxx/include/__cxx03/__split_buffer
@@ -86,138 +86,114 @@ public:
__split_buffer(const __split_buffer&) = delete;
__split_buffer& operator=(const __split_buffer&) = delete;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
+ _LIBCPP_HIDE_FROM_ABI __split_buffer()
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __default_init_tag()) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(__alloc_rr& __a)
+ _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(__alloc_rr& __a)
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(const __alloc_rr& __a)
+ _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(const __alloc_rr& __a)
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
- __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
+ _LIBCPP_HIDE_FROM_ABI __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
+ _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer& operator=(__split_buffer&& __c)
- _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
- is_nothrow_move_assignable<allocator_type>::value) ||
- !__alloc_traits::propagate_on_container_move_assignment::value);
+ _LIBCPP_HIDE_FROM_ABI __split_buffer& operator=(__split_buffer&& __c);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~__split_buffer();
+ _LIBCPP_HIDE_FROM_ABI ~__split_buffer();
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __alloc_rr& __alloc() _NOEXCEPT { return __end_cap_.second(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const __alloc_rr& __alloc() const _NOEXCEPT {
- return __end_cap_.second();
- }
+ _LIBCPP_HIDE_FROM_ABI __alloc_rr& __alloc() _NOEXCEPT { return __end_cap_.second(); }
+ _LIBCPP_HIDE_FROM_ABI const __alloc_rr& __alloc() const _NOEXCEPT { return __end_cap_.second(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT { return __end_cap_.first(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {
- return __end_cap_.first();
- }
+ _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT { return __end_cap_.first(); }
+ _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT { return __end_cap_.first(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __begin_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __begin_; }
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __begin_; }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __begin_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __end_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return __end_; }
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __end_; }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return __end_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __destruct_at_end(__begin_); }
+ _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __destruct_at_end(__begin_); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type size() const {
- return static_cast<size_type>(__end_ - __begin_);
- }
+ _LIBCPP_HIDE_FROM_ABI size_type size() const { return static_cast<size_type>(__end_ - __begin_); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool empty() const { return __end_ == __begin_; }
+ _LIBCPP_HIDE_FROM_ABI bool empty() const { return __end_ == __begin_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type capacity() const {
- return static_cast<size_type>(__end_cap() - __first_);
- }
+ _LIBCPP_HIDE_FROM_ABI size_type capacity() const { return static_cast<size_type>(__end_cap() - __first_); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __front_spare() const {
- return static_cast<size_type>(__begin_ - __first_);
- }
+ _LIBCPP_HIDE_FROM_ABI size_type __front_spare() const { return static_cast<size_type>(__begin_ - __first_); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __back_spare() const {
- return static_cast<size_type>(__end_cap() - __end_);
- }
+ _LIBCPP_HIDE_FROM_ABI size_type __back_spare() const { return static_cast<size_type>(__end_cap() - __end_); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference front() { return *__begin_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const { return *__begin_; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference back() { return *(__end_ - 1); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back() const { return *(__end_ - 1); }
+ _LIBCPP_HIDE_FROM_ABI reference front() { return *__begin_; }
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const { return *__begin_; }
+ _LIBCPP_HIDE_FROM_ABI reference back() { return *(__end_ - 1); }
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const { return *(__end_ - 1); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
+ _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void push_front(const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __x);
+ _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args);
+ _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_front() { __destruct_at_begin(__begin_ + 1); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_back() { __destruct_at_end(__end_ - 1); }
+ _LIBCPP_HIDE_FROM_ABI void pop_front() { __destruct_at_begin(__begin_ + 1); }
+ _LIBCPP_HIDE_FROM_ABI void pop_back() { __destruct_at_end(__end_ - 1); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
template <class _InputIter, __enable_if_t<__has_exactly_input_iterator_category<_InputIter>::value, int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(_InputIter __first, _InputIter __last);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(_InputIter __first, _InputIter __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
- __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
- __construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last);
template <class _Iterator>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
- __construct_at_end_with_size(_Iterator __first, size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end_with_size(_Iterator __first, size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin) {
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin) {
__destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, false_type);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, true_type);
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, false_type);
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, true_type);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT {
__destruct_at_end(__new_last, false_type());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer& __x)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__alloc_rr>);
+ _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer& __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
private:
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer& __c, true_type) {
__alloc() = std::move(__c.__alloc());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT {}
struct _ConstructTransaction {
- _LIBCPP_CONSTEXPR_SINCE_CXX20
_LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
: __pos_(*__p),
__end_(*__p + __n),
__dest_(__p) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() { *__dest_ = __pos_; }
+ _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() { *__dest_ = __pos_; }
pointer __pos_;
const pointer __end_;
@@ -228,7 +204,7 @@ private:
};
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 bool __split_buffer<_Tp, _Allocator>::__invariants() const {
+bool __split_buffer<_Tp, _Allocator>::__invariants() const {
if (__first_ == nullptr) {
if (__begin_ != nullptr)
return false;
@@ -253,7 +229,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __split_buffer<_Tp, _Allocator>::__invariants
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n) {
_ConstructTransaction __tx(&this->__end_, __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_));
@@ -267,8 +243,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::__construct_
// Postcondition: size() == old size() + __n
// Postcondition: [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x) {
_ConstructTransaction __tx(&this->__end_, __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_), __x);
@@ -277,15 +252,13 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_referen
template <class _Tp, class _Allocator>
template <class _InputIter, __enable_if_t<__has_exactly_input_iterator_category<_InputIter>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last) {
__construct_at_end_with_sentinel(__first, __last);
}
template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__split_buffer<_Tp, _Allocator>::__construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last) {
__alloc_rr& __a = this->__alloc();
for (; __first != __last; ++__first) {
if (__end_ == __end_cap()) {
@@ -302,15 +275,13 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end_with_sentinel(_Iterator __fi
}
template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) {
__construct_at_end_with_size(__first, std::distance(__first, __last));
}
template <class _Tp, class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-__split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator __first, size_type __n) {
+void __split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator __first, size_type __n) {
_ConstructTransaction __tx(&this->__end_, __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__first) {
__alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_), *__first);
@@ -318,33 +289,30 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator _
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
-__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type) {
+inline void __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type) {
while (__begin_ != __new_begin)
__alloc_traits::destroy(__alloc(), std::__to_address(__begin_++));
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
-__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type) {
+inline void __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type) {
__begin_ = __new_begin;
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
+inline _LIBCPP_HIDE_FROM_ABI void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT {
while (__new_last != __end_)
__alloc_traits::destroy(__alloc(), std::__to_address(--__end_));
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
+inline _LIBCPP_HIDE_FROM_ABI void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT {
__end_ = __new_last;
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
: __end_cap_(nullptr, __a) {
if (__cap == 0) {
@@ -359,15 +327,14 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __sta
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __split_buffer<_Tp, _Allocator>::~__split_buffer() {
+__split_buffer<_Tp, _Allocator>::~__split_buffer() {
clear();
if (__first_)
__alloc_traits::deallocate(__alloc(), __first_, capacity());
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
: __first_(std::move(__c.__first_)),
__begin_(std::move(__c.__begin_)),
__end_(std::move(__c.__end_)),
@@ -379,7 +346,6 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 __split_buffer<_Tp, _Allocator>::__split_buffer(__
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
: __end_cap_(nullptr, __a) {
if (__a == __c.__alloc()) {
@@ -402,11 +368,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __al
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __split_buffer<_Tp, _Allocator>&
-__split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
- _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
- is_nothrow_move_assignable<allocator_type>::value) ||
- !__alloc_traits::propagate_on_container_move_assignment::value) {
+__split_buffer<_Tp, _Allocator>& __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c) {
clear();
shrink_to_fit();
__first_ = __c.__first_;
@@ -419,8 +381,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__alloc_rr>) {
+void __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x) {
std::swap(__first_, __x.__first_);
std::swap(__begin_, __x.__begin_);
std::swap(__end_, __x.__end_);
@@ -429,7 +390,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::swap(__split
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::reserve(size_type __n) {
+void __split_buffer<_Tp, _Allocator>::reserve(size_type __n) {
if (__n < capacity()) {
__split_buffer<value_type, __alloc_rr&> __t(__n, 0, __alloc());
__t.__construct_at_end(move_iterator<pointer>(__begin_), move_iterator<pointer>(__end_));
@@ -441,7 +402,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::reserve(size
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT {
+void __split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT {
if (capacity() > size()) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
try {
@@ -461,7 +422,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::shrink_to_fi
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_front(const_reference __x) {
+void __split_buffer<_Tp, _Allocator>::push_front(const_reference __x) {
if (__begin_ == __first_) {
if (__end_ < __end_cap()) {
difference_type __d = __end_cap() - __end_;
@@ -483,7 +444,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_front(c
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) {
+void __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) {
if (__begin_ == __first_) {
if (__end_ < __end_cap()) {
difference_type __d = __end_cap() - __end_;
@@ -505,8 +466,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_front(v
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
-__split_buffer<_Tp, _Allocator>::push_back(const_reference __x) {
+inline _LIBCPP_HIDE_FROM_ABI void __split_buffer<_Tp, _Allocator>::push_back(const_reference __x) {
if (__end_ == __end_cap()) {
if (__begin_ > __first_) {
difference_type __d = __begin_ - __first_;
@@ -528,7 +488,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) {
+void __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) {
if (__end_ == __end_cap()) {
if (__begin_ > __first_) {
difference_type __d = __begin_ - __first_;
@@ -551,7 +511,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::push_back(va
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) {
+void __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) {
if (__end_ == __end_cap()) {
if (__begin_ > __first_) {
difference_type __d = __begin_ - __first_;
@@ -573,8 +533,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::emplace_back
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
-swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/__string/char_traits.h b/libcxx/include/__cxx03/__string/char_traits.h
index e6f4b66c8db03..28366905c716a 100644
--- a/libcxx/include/__cxx03/__string/char_traits.h
+++ b/libcxx/include/__cxx03/__string/char_traits.h
@@ -83,23 +83,17 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char> {
using pos_type = streampos;
using state_type = mbstate_t;
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
- assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {
- __c1 = __c2;
- }
+ static inline _LIBCPP_HIDE_FROM_ABI void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT { __c1 = __c2; }
// TODO: Make this _LIBCPP_HIDE_FROM_ABI
- static inline _LIBCPP_HIDDEN _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {
- return __c1 == __c2;
- }
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {
+ static inline _LIBCPP_HIDDEN bool eq(char_type __c1, char_type __c2) _NOEXCEPT { return __c1 == __c2; }
+ static inline _LIBCPP_HIDE_FROM_ABI bool lt(char_type __c1, char_type __c2) _NOEXCEPT {
return (unsigned char)__c1 < (unsigned char)__c2;
}
// __constexpr_memcmp requires a trivially lexicographically comparable type, but char is not when char is a signed
// type
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
- compare(const char_type* __lhs, const char_type* __rhs, size_t __count) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI int compare(const char_type* __lhs, const char_type* __rhs, size_t __count) _NOEXCEPT {
if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
return __builtin_memcmp(__lhs, __rhs, __count);
@@ -121,49 +115,41 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char> {
}
}
- static inline _LIBCPP_HIDE_FROM_ABI size_t _LIBCPP_CONSTEXPR_SINCE_CXX17 length(const char_type* __s) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI size_t length(const char_type* __s) _NOEXCEPT {
return std::__constexpr_strlen(__s);
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
if (__n == 0)
return nullptr;
return std::__constexpr_memchr(__s, __a, __n);
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
_LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(!std::__is_pointer_in_range(__s1, __s1 + __n, __s2),
"char_traits::copy: source and destination ranges overlap");
std::__constexpr_memmove(__s1, __s2, __element_count(__n));
return __s1;
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI int_type not_eof(int_type __c) _NOEXCEPT {
return eq_int_type(__c, eof()) ? ~eof() : __c;
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT {
- return char_type(__c);
- }
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT {
+ static inline _LIBCPP_HIDE_FROM_ABI char_type to_char_type(int_type __c) _NOEXCEPT { return char_type(__c); }
+ static inline _LIBCPP_HIDE_FROM_ABI int_type to_int_type(char_type __c) _NOEXCEPT {
return int_type((unsigned char)__c);
}
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT {
- return __c1 == __c2;
- }
- static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT { return int_type(EOF); }
+ static inline _LIBCPP_HIDE_FROM_ABI bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT { return __c1 == __c2; }
+ static inline _LIBCPP_HIDE_FROM_ABI int_type eof() _NOEXCEPT { return int_type(EOF); }
};
template <class _CharT, class _IntT, _IntT _EOFVal>
@@ -176,50 +162,36 @@ struct __char_traits_base {
// There are different aliases for the different char types, but they are all aliases to this type
using pos_type = fpos<mbstate_t>;
- _LIBCPP_HIDE_FROM_ABI static inline _LIBCPP_CONSTEXPR_SINCE_CXX17 void
- assign(char_type& __lhs, const char_type& __rhs) _NOEXCEPT {
- __lhs = __rhs;
- }
+ _LIBCPP_HIDE_FROM_ABI static inline void assign(char_type& __lhs, const char_type& __rhs) _NOEXCEPT { __lhs = __rhs; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR bool eq(char_type __lhs, char_type __rhs) _NOEXCEPT {
- return __lhs == __rhs;
- }
+ _LIBCPP_HIDE_FROM_ABI static bool eq(char_type __lhs, char_type __rhs) _NOEXCEPT { return __lhs == __rhs; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR bool lt(char_type __lhs, char_type __rhs) _NOEXCEPT {
- return __lhs < __rhs;
- }
+ _LIBCPP_HIDE_FROM_ABI static bool lt(char_type __lhs, char_type __rhs) _NOEXCEPT { return __lhs < __rhs; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- move(char_type* __dest, const char_type* __src, size_t __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static char_type* move(char_type* __dest, const char_type* __src, size_t __n) _NOEXCEPT {
return std::__constexpr_memmove(__dest, __src, __element_count(__n));
}
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- copy(char_type* __dest, const char_type* __src, size_t __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static char_type* copy(char_type* __dest, const char_type* __src, size_t __n) _NOEXCEPT {
_LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(!std::__is_pointer_in_range(__dest, __dest + __n, __src),
"char_traits::copy: source and destination ranges overlap");
return std::__constexpr_memmove(__dest, __src, __element_count(__n));
}
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
- assign(char_type* __str, size_t __n, char_type __fill_char) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static char_type* assign(char_type* __str, size_t __n, char_type __fill_char) _NOEXCEPT {
std::fill_n(__str, __n, __fill_char);
return __str;
}
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT {
- return char_type(__c);
- }
+ _LIBCPP_HIDE_FROM_ABI static char_type to_char_type(int_type __c) _NOEXCEPT { return char_type(__c); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT { return int_type(__c); }
+ _LIBCPP_HIDE_FROM_ABI static int_type to_int_type(char_type __c) _NOEXCEPT { return int_type(__c); }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR bool eq_int_type(int_type __lhs, int_type __rhs) _NOEXCEPT {
- return __lhs == __rhs;
- }
+ _LIBCPP_HIDE_FROM_ABI static bool eq_int_type(int_type __lhs, int_type __rhs) _NOEXCEPT { return __lhs == __rhs; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT { return _EOFVal; }
+ _LIBCPP_HIDE_FROM_ABI static int_type eof() _NOEXCEPT { return _EOFVal; }
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static int_type not_eof(int_type __c) _NOEXCEPT {
return eq_int_type(__c, eof()) ? static_cast<int_type>(~eof()) : __c;
}
};
@@ -229,19 +201,15 @@ struct __char_traits_base {
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, wint_t, static_cast<wint_t>(WEOF)> {
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
- compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (__n == 0)
return 0;
return std::__constexpr_wmemcmp(__s1, __s2, __n);
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT {
- return std::__constexpr_wcslen(__s);
- }
+ static _LIBCPP_HIDE_FROM_ABI size_t length(const char_type* __s) _NOEXCEPT { return std::__constexpr_wcslen(__s); }
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
if (__n == 0)
return nullptr;
return std::__constexpr_wmemchr(__s, __a, __n);
@@ -274,12 +242,10 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
: __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(0xFFFF)> {
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int
- compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI static int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI static size_t length(const char_type* __s) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
__identity __proj;
const char_type* __match = std::__find(__s, __s + __n, __a, __proj);
if (__match == __s + __n)
@@ -288,8 +254,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
}
};
-inline _LIBCPP_CONSTEXPR_SINCE_CXX17 int
-char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
+inline int char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
for (; __n; --__n, ++__s1, ++__s2) {
if (lt(*__s1, *__s2))
return -1;
@@ -299,7 +264,7 @@ char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, siz
return 0;
}
-inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT {
+inline size_t char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT {
size_t __len = 0;
for (; !eq(*__s, char_type(0)); ++__s)
++__len;
@@ -309,12 +274,10 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char16_t>::length(const
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
: __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(0xFFFFFFFF)> {
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int
- compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI static int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI static size_t length(const char_type* __s) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
__identity __proj;
const char_type* __match = std::__find(__s, __s + __n, __a, __proj);
if (__match == __s + __n)
@@ -323,8 +286,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
}
};
-inline _LIBCPP_CONSTEXPR_SINCE_CXX17 int
-char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
+inline int char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
for (; __n; --__n, ++__s1, ++__s2) {
if (lt(*__s1, *__s2))
return -1;
@@ -334,7 +296,7 @@ char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, siz
return 0;
}
-inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT {
+inline size_t char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT {
size_t __len = 0;
for (; !eq(*__s, char_type(0)); ++__s)
++__len;
@@ -345,8 +307,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char32_t>::length(const
// __str_find
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-__str_find(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
+inline _SizeT _LIBCPP_HIDE_FROM_ABI __str_find(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
if (__pos >= __sz)
return __npos;
const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c);
@@ -356,7 +317,7 @@ __str_find(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
}
template <class _CharT, class _Traits>
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 const _CharT* __search_substring(
+_LIBCPP_HIDE_FROM_ABI inline const _CharT* __search_substring(
const _CharT* __first1, const _CharT* __last1, const _CharT* __first2, const _CharT* __last2) _NOEXCEPT {
// Take advantage of knowing source and pattern lengths.
// Stop short when source is smaller than pattern.
@@ -394,7 +355,7 @@ _LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 const _CharT* __searc
}
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
if (__pos > __sz)
return __npos;
@@ -412,8 +373,7 @@ __str_find(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _Siz
// __str_rfind
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-__str_rfind(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
+inline _SizeT _LIBCPP_HIDE_FROM_ABI __str_rfind(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
if (__sz < 1)
return __npos;
if (__pos < __sz)
@@ -428,7 +388,7 @@ __str_rfind(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT
}
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_rfind(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
__pos = std::min(__pos, __sz);
if (__n < __sz - __pos)
@@ -443,7 +403,7 @@ __str_rfind(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _Si
// __str_find_first_of
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_first_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
if (__pos >= __sz || __n == 0)
return __npos;
@@ -455,7 +415,7 @@ __str_find_first_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __
// __str_find_last_of
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_last_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
if (__n != 0) {
if (__pos < __sz)
@@ -473,7 +433,7 @@ __str_find_last_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __p
// __str_find_first_not_of
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_first_not_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
if (__pos < __sz) {
const _CharT* __pe = __p + __sz;
@@ -485,7 +445,7 @@ __str_find_first_not_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _Size
}
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_first_not_of(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
if (__pos < __sz) {
const _CharT* __pe = __p + __sz;
@@ -498,7 +458,7 @@ __str_find_first_not_of(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos
// __str_find_last_not_of
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_last_not_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT {
if (__pos < __sz)
++__pos;
@@ -511,7 +471,7 @@ __str_find_last_not_of(const _CharT* __p, _SizeT __sz, const _CharT* __s, _SizeT
}
template <class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+inline _SizeT _LIBCPP_HIDE_FROM_ABI
__str_find_last_not_of(const _CharT* __p, _SizeT __sz, _CharT __c, _SizeT __pos) _NOEXCEPT {
if (__pos < __sz)
++__pos;
diff --git a/libcxx/include/__cxx03/__string/constexpr_c_functions.h b/libcxx/include/__cxx03/__string/constexpr_c_functions.h
index 508f473098870..315058dcc06e5 100644
--- a/libcxx/include/__cxx03/__string/constexpr_c_functions.h
+++ b/libcxx/include/__cxx03/__string/constexpr_c_functions.h
@@ -47,7 +47,7 @@ inline const bool __is_char_type<char8_t> = true;
#endif
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_strlen(const _Tp* __str) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI size_t __constexpr_strlen(const _Tp* __str) _NOEXCEPT {
static_assert(__is_char_type<_Tp>, "__constexpr_strlen only works with char and char8_t");
// GCC currently doesn't support __builtin_strlen for heap-allocated memory during constant evaluation.
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816
@@ -64,8 +64,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_st
// equivalent to a std::memcmp. Since we have multiple objects contiguously in memory, we can call memcmp once instead
// of invoking it on every object individually.
template <class _Tp, class _Up>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
-__constexpr_memcmp(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
+_LIBCPP_HIDE_FROM_ABI int __constexpr_memcmp(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
static_assert(__libcpp_is_trivially_lexicographically_comparable<_Tp, _Up>::value,
"_Tp and _Up have to be trivially lexicographically comparable");
@@ -97,8 +96,7 @@ __constexpr_memcmp(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
// to a std::memcmp(...) == 0. Since we have multiple objects contiguously in memory, we can call memcmp once instead
// of invoking it on every object individually.
template <class _Tp, class _Up>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-__constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
static_assert(__libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
"_Tp and _Up have to be trivially equality comparable");
@@ -124,12 +122,12 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n
}
template <class _Tp, class _Up>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_memchr(_Tp* __str, _Up __value, size_t __count) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __constexpr_memchr(_Tp* __str, _Up __value, size_t __count) {
static_assert(sizeof(_Tp) == 1 && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
"Calling memchr on non-trivially equality comparable types is unsafe.");
if (__libcpp_is_constant_evaluated()) {
-// use __builtin_char_memchr to optimize constexpr evaluation if we can
+ // use __builtin_char_memchr to optimize constexpr evaluation if we can
for (; __count; --__count) {
if (*__str == __value)
@@ -155,7 +153,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_memchr(_Tp*
// This is necessary in order to implement __constexpr_memmove below in a way that mirrors as
// closely as possible what the compiler's __builtin_memmove is able to do.
template <class _Tp, class _Up, __enable_if_t<is_assignable<_Tp&, _Up const&>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
+_LIBCPP_HIDE_FROM_ABI _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
__dest = __src;
return __dest;
}
@@ -164,7 +162,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& __assign_trivially_copy
template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::value &&
is_assignable<_Tp&, _Up&&>::value, int> = 0>
// clang-format on
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
+_LIBCPP_HIDE_FROM_ABI _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
__dest =
static_cast<_Up&&>(__src); // this is safe, we're not actually moving anything since the assignment is trivial
return __dest;
@@ -175,7 +173,7 @@ template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::
!is_assignable<_Tp&, _Up&&>::value &&
is_constructible<_Tp, _Up const&>::value, int> = 0>
// clang-format on
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
+_LIBCPP_HIDE_FROM_ABI _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
// _Tp is trivially destructible, so we don't need to call its destructor to end the lifetime of the object
// that was there previously
std::__construct_at(std::addressof(__dest), __src);
@@ -188,7 +186,7 @@ template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::
!is_constructible<_Tp, _Up const&>::value &&
is_constructible<_Tp, _Up&&>::value, int> = 0>
// clang-format on
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
+_LIBCPP_HIDE_FROM_ABI _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
// _Tp is trivially destructible, so we don't need to call its destructor to end the lifetime of the object
// that was there previously
std::__construct_at(
@@ -198,8 +196,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __assign_trivially_copy
}
template <class _Tp, class _Up, __enable_if_t<__is_always_bitcastable<_Up, _Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
-__constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n) {
+_LIBCPP_HIDE_FROM_ABI _Tp* __constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n) {
size_t __count = static_cast<size_t>(__n);
if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
diff --git a/libcxx/include/__cxx03/__system_error/error_category.h b/libcxx/include/__cxx03/__system_error/error_category.h
index c5f3f79c5074c..8f04158ffc010 100644
--- a/libcxx/include/__cxx03/__system_error/error_category.h
+++ b/libcxx/include/__cxx03/__system_error/error_category.h
@@ -31,7 +31,7 @@ class _LIBCPP_EXPORTED_FROM_ABI error_category {
#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
error_category() noexcept;
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 error_category() _NOEXCEPT = default;
+ _LIBCPP_HIDE_FROM_ABI error_category() _NOEXCEPT = default;
#endif
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
diff --git a/libcxx/include/__cxx03/__thread/poll_with_backoff.h b/libcxx/include/__cxx03/__thread/poll_with_backoff.h
index b500629c85217..1d2db7728cc70 100644
--- a/libcxx/include/__cxx03/__thread/poll_with_backoff.h
+++ b/libcxx/include/__cxx03/__thread/poll_with_backoff.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-static _LIBCPP_CONSTEXPR const int __libcpp_polling_count = 64;
+static const int __libcpp_polling_count = 64;
// Polls a thread for a condition given by a predicate, and backs off based on a backoff policy
// before polling again.
@@ -59,7 +59,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool __libcpp_thread_poll_with_b
// so this should most likely only be used on single-threaded systems where there
// are no other threads to compete with.
struct __spinning_backoff_policy {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator()(chrono::nanoseconds const&) const { return false; }
+ _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds const&) const { return false; }
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__thread/this_thread.h b/libcxx/include/__cxx03/__thread/this_thread.h
index ae9c37ef02fbb..4584d2d00ea9f 100644
--- a/libcxx/include/__cxx03/__thread/this_thread.h
+++ b/libcxx/include/__cxx03/__thread/this_thread.h
@@ -37,7 +37,7 @@ _LIBCPP_HIDE_FROM_ABI void sleep_for(const chrono::duration<_Rep, _Period>& __d)
// The standard guarantees a 64bit signed integer resolution for nanoseconds,
// so use INT64_MAX / 1e9 as cut-off point. Use a constant to avoid <climits>
// and issues with long double folding on PowerPC with GCC.
- _LIBCPP_CONSTEXPR chrono::duration<long double> __max = chrono::duration<long double>(9223372036.0L);
+ chrono::duration<long double> __max = chrono::duration<long double>(9223372036.0L);
chrono::nanoseconds __ns;
if (__d < __max) {
__ns = chrono::duration_cast<chrono::nanoseconds>(__d);
diff --git a/libcxx/include/__cxx03/__tree b/libcxx/include/__cxx03/__tree
index b1d43b4e2933e..3773fb485f488 100644
--- a/libcxx/include/__cxx03/__tree
+++ b/libcxx/include/__cxx03/__tree
@@ -950,8 +950,7 @@ public:
typedef __tree_iterator<value_type, __node_pointer, difference_type> iterator;
typedef __tree_const_iterator<value_type, __node_pointer, difference_type> const_iterator;
- _LIBCPP_HIDE_FROM_ABI explicit __tree(const value_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value);
+ _LIBCPP_HIDE_FROM_ABI explicit __tree(const value_compare& __comp);
_LIBCPP_HIDE_FROM_ABI explicit __tree(const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI __tree(const value_compare& __comp, const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI __tree(const __tree& __t);
@@ -960,12 +959,9 @@ public:
_LIBCPP_HIDE_FROM_ABI void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
template <class _InputIterator>
_LIBCPP_HIDE_FROM_ABI void __assign_multi(_InputIterator __first, _InputIterator __last);
- _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t) _NOEXCEPT_(
- is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<value_compare>::value);
+ _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t);
_LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t, const allocator_type& __a);
- _LIBCPP_HIDE_FROM_ABI __tree& operator=(__tree&& __t) _NOEXCEPT_(
- __node_traits::propagate_on_container_move_assignment::value&& is_nothrow_move_assignable<value_compare>::value&&
- is_nothrow_move_assignable<__node_allocator>::value);
+ _LIBCPP_HIDE_FROM_ABI __tree& operator=(__tree&& __t);
_LIBCPP_HIDE_FROM_ABI ~__tree();
_LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(__begin_node()); }
@@ -979,9 +975,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI void swap(__tree& __t)
- _NOEXCEPT_(__is_nothrow_swappable_v<value_compare> &&
- (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>));
+ _LIBCPP_HIDE_FROM_ABI void swap(__tree& __t);
template <class _Key, class... _Args>
_LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args&&... __args);
@@ -1215,17 +1209,13 @@ private:
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __tree&, false_type) {}
_LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, false_type);
- _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, true_type) _NOEXCEPT_(
- is_nothrow_move_assignable<value_compare>::value&& is_nothrow_move_assignable<__node_allocator>::value);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, true_type);
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__tree& __t)
- _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__tree& __t) {
__move_assign_alloc(__t, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__tree& __t, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__tree& __t, true_type) {
__node_alloc() = std::move(__t.__node_alloc());
}
_LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
@@ -1274,9 +1264,7 @@ private:
};
template <class _Tp, class _Compare, class _Allocator>
-__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value)
- : __pair3_(0, __comp) {
+__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp) : __pair3_(0, __comp) {
__begin_node() = __end_node();
}
@@ -1395,8 +1383,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
}
template <class _Tp, class _Compare, class _Allocator>
-__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) _NOEXCEPT_(
- is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<value_compare>::value)
+__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
: __begin_node_(std::move(__t.__begin_node_)),
__pair1_(std::move(__t.__pair1_)),
__pair3_(std::move(__t.__pair3_)) {
@@ -1431,8 +1418,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __
}
template <class _Tp, class _Compare, class _Allocator>
-void __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value&& is_nothrow_move_assignable<__node_allocator>::value) {
+void __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, true_type) {
destroy(static_cast<__node_pointer>(__end_node()->__left_));
__begin_node_ = __t.__begin_node_;
__pair1_.first() = __t.__pair1_.first();
@@ -1469,11 +1455,7 @@ void __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) {
}
template <class _Tp, class _Compare, class _Allocator>
-__tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) _NOEXCEPT_(
- __node_traits::propagate_on_container_move_assignment::value&& is_nothrow_move_assignable<value_compare>::value&&
- is_nothrow_move_assignable<__node_allocator>::value)
-
-{
+__tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) {
__move_assign(__t, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>());
return *this;
}
@@ -1496,10 +1478,7 @@ void __tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd) _NOEXCEPT {
}
template <class _Tp, class _Compare, class _Allocator>
-void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
- _NOEXCEPT_(__is_nothrow_swappable_v<value_compare> &&
- (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>))
-{
+void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t) {
using std::swap;
swap(__begin_node_, __t.__begin_node_);
swap(__pair1_.first(), __t.__pair1_.first());
@@ -2116,8 +2095,7 @@ __tree<_Tp, _Compare, _Allocator>::remove(const_iterator __p) _NOEXCEPT {
}
template <class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI void swap(__tree<_Tp, _Compare, _Allocator>& __x, __tree<_Tp, _Compare, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__tree<_Tp, _Compare, _Allocator>& __x, __tree<_Tp, _Compare, _Allocator>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/__type_traits/aligned_storage.h b/libcxx/include/__cxx03/__type_traits/aligned_storage.h
index 9195926459472..216b8b410cc25 100644
--- a/libcxx/include/__cxx03/__type_traits/aligned_storage.h
+++ b/libcxx/include/__cxx03/__type_traits/aligned_storage.h
@@ -87,7 +87,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {
+struct _LIBCPP_TEMPLATE_VIS aligned_storage {
typedef typename __find_pod<__all_types, _Align>::type _Aligner;
union type {
_Aligner __align;
@@ -97,7 +97,7 @@ struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
template <size_t _Len> \
- struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n> { \
+ struct _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n> { \
struct _ALIGNAS(n) type { \
unsigned char __lx[(_Len + n - 1) / n * n]; \
}; \
diff --git a/libcxx/include/__cxx03/__type_traits/aligned_union.h b/libcxx/include/__cxx03/__type_traits/aligned_union.h
index b3fa2b8a56c07..22543833bb452 100644
--- a/libcxx/include/__cxx03/__type_traits/aligned_union.h
+++ b/libcxx/include/__cxx03/__type_traits/aligned_union.h
@@ -34,7 +34,7 @@ struct __static_max<_I0, _I1, _In...> {
};
template <size_t _Len, class _Type0, class... _Types>
-struct _LIBCPP_DEPRECATED_IN_CXX23 aligned_union {
+struct aligned_union {
static const size_t alignment_value =
__static_max<_LIBCPP_PREFERRED_ALIGNOF(_Type0), _LIBCPP_PREFERRED_ALIGNOF(_Types)...>::value;
static const size_t __len = __static_max<_Len, sizeof(_Type0), sizeof(_Types)...>::value;
diff --git a/libcxx/include/__cxx03/__type_traits/integral_constant.h b/libcxx/include/__cxx03/__type_traits/integral_constant.h
index 16fb9f60e631a..3e67e010b4da8 100644
--- a/libcxx/include/__cxx03/__type_traits/integral_constant.h
+++ b/libcxx/include/__cxx03/__type_traits/integral_constant.h
@@ -19,14 +19,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, _Tp __v>
struct _LIBCPP_TEMPLATE_VIS integral_constant {
- static _LIBCPP_CONSTEXPR const _Tp value = __v;
+ static const _Tp value = __v;
typedef _Tp value_type;
typedef integral_constant type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT { return value; }
+ _LIBCPP_HIDE_FROM_ABI operator value_type() const _NOEXCEPT { return value; }
};
template <class _Tp, _Tp __v>
-_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
+const _Tp integral_constant<_Tp, __v>::value;
typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;
diff --git a/libcxx/include/__cxx03/__type_traits/invoke.h b/libcxx/include/__cxx03/__type_traits/invoke.h
index 9ea67475a4f62..1ae236d9676b0 100644
--- a/libcxx/include/__cxx03/__type_traits/invoke.h
+++ b/libcxx/include/__cxx03/__type_traits/invoke.h
@@ -96,56 +96,49 @@ __nat __invoke(_Args&&... __args);
// clang-format off
template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet1<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype((std::declval<_A0>().*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
- _NOEXCEPT_(noexcept((static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...)))
{ return (static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...); }
template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet2<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype((std::declval<_A0>().get().*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
- _NOEXCEPT_(noexcept((__a0.get().*__f)(static_cast<_Args&&>(__args)...)))
{ return (__a0.get().*__f)(static_cast<_Args&&>(__args)...); }
template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet3<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype(((*std::declval<_A0>()).*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
- _NOEXCEPT_(noexcept(((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...)))
{ return ((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...); }
// bullets 4, 5 and 6
template <class _Fp, class _A0, class = __enable_if_bullet4<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype(std::declval<_A0>().*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
- _NOEXCEPT_(noexcept(static_cast<_A0&&>(__a0).*__f))
{ return static_cast<_A0&&>(__a0).*__f; }
template <class _Fp, class _A0, class = __enable_if_bullet5<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype(std::declval<_A0>().get().*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
- _NOEXCEPT_(noexcept(__a0.get().*__f))
{ return __a0.get().*__f; }
template <class _Fp, class _A0, class = __enable_if_bullet6<_Fp, _A0> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype((*std::declval<_A0>()).*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
- _NOEXCEPT_(noexcept((*static_cast<_A0&&>(__a0)).*__f))
{ return (*static_cast<_A0&&>(__a0)).*__f; }
// bullet 7
template <class _Fp, class... _Args>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI
decltype(std::declval<_Fp>()(std::declval<_Args>()...))
__invoke(_Fp&& __f, _Args&&... __args)
- _NOEXCEPT_(noexcept(static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...)))
{ return static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...); }
// clang-format on
@@ -203,7 +196,7 @@ struct __invoke_of
template <class _Ret, bool = is_void<_Ret>::value>
struct __invoke_void_return_wrapper {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static _Ret __call(_Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI static _Ret __call(_Args&&... __args) {
return std::__invoke(std::forward<_Args>(__args)...);
}
};
@@ -211,7 +204,7 @@ struct __invoke_void_return_wrapper {
template <class _Ret>
struct __invoke_void_return_wrapper<_Ret, true> {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void __call(_Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI static void __call(_Args&&... __args) {
std::__invoke(std::forward<_Args>(__args)...);
}
};
diff --git a/libcxx/include/__cxx03/__type_traits/is_constant_evaluated.h b/libcxx/include/__cxx03/__type_traits/is_constant_evaluated.h
index e091b8c576025..9034a3499cbf7 100644
--- a/libcxx/include/__cxx03/__type_traits/is_constant_evaluated.h
+++ b/libcxx/include/__cxx03/__type_traits/is_constant_evaluated.h
@@ -17,7 +17,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI inline bool __libcpp_is_constant_evaluated() _NOEXCEPT {
return __builtin_is_constant_evaluated();
}
diff --git a/libcxx/include/__cxx03/__type_traits/is_literal_type.h b/libcxx/include/__cxx03/__type_traits/is_literal_type.h
index 5c15a6c395f48..6c5df6ef71d81 100644
--- a/libcxx/include/__cxx03/__type_traits/is_literal_type.h
+++ b/libcxx/include/__cxx03/__type_traits/is_literal_type.h
@@ -19,8 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> {};
+struct _LIBCPP_TEMPLATE_VIS is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/__type_traits/is_swappable.h b/libcxx/include/__cxx03/__type_traits/is_swappable.h
index 7b87a95446cc5..592c6f247c1ff 100644
--- a/libcxx/include/__cxx03/__type_traits/is_swappable.h
+++ b/libcxx/include/__cxx03/__type_traits/is_swappable.h
@@ -42,12 +42,10 @@ template <class>
using __swap_result_t = void;
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y)
- _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value);
+inline _LIBCPP_HIDE_FROM_ABI __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y);
template <class _Tp, size_t _Np, __enable_if_t<__is_swappable_v<_Tp>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable_v<_Tp>);
+inline _LIBCPP_HIDE_FROM_ABI void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]);
// ALL generic swap overloads MUST already have a declaration available at this point.
diff --git a/libcxx/include/__cxx03/__type_traits/result_of.h b/libcxx/include/__cxx03/__type_traits/result_of.h
index 4efe42de04536..da1552cdebc0e 100644
--- a/libcxx/include/__cxx03/__type_traits/result_of.h
+++ b/libcxx/include/__cxx03/__type_traits/result_of.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// result_of
template <class _Callable>
-class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
+class result_of;
template <class _Fp, class... _Args>
class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> : public __invoke_of<_Fp, _Args...> {};
diff --git a/libcxx/include/__cxx03/__utility/convert_to_integral.h b/libcxx/include/__cxx03/__utility/convert_to_integral.h
index e1cc9195de165..dc91147298c94 100644
--- a/libcxx/include/__cxx03/__utility/convert_to_integral.h
+++ b/libcxx/include/__cxx03/__utility/convert_to_integral.h
@@ -21,31 +21,27 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __convert_to_integral(int __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI int __convert_to_integral(int __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned __convert_to_integral(unsigned __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI unsigned __convert_to_integral(unsigned __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long __convert_to_integral(long __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI long __convert_to_integral(long __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long __convert_to_integral(unsigned long __val) {
- return __val;
-}
+inline _LIBCPP_HIDE_FROM_ABI unsigned long __convert_to_integral(unsigned long __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long long __convert_to_integral(long long __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI long long __convert_to_integral(long long __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long long __convert_to_integral(unsigned long long __val) {
- return __val;
-}
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long __convert_to_integral(unsigned long long __val) { return __val; }
template <typename _Fp, __enable_if_t<is_floating_point<_Fp>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long long __convert_to_integral(_Fp __val) {
+inline _LIBCPP_HIDE_FROM_ABI long long __convert_to_integral(_Fp __val) {
return __val;
}
#ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __int128_t __convert_to_integral(__int128_t __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI __int128_t __convert_to_integral(__int128_t __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI __uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
#endif
template <class _Tp, bool = is_enum<_Tp>::value>
@@ -58,8 +54,7 @@ template <class _Tp>
struct __sfinae_underlying_type<_Tp, false> {};
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename __sfinae_underlying_type<_Tp>::__promoted_type
-__convert_to_integral(_Tp __val) {
+inline _LIBCPP_HIDE_FROM_ABI typename __sfinae_underlying_type<_Tp>::__promoted_type __convert_to_integral(_Tp __val) {
return __val;
}
diff --git a/libcxx/include/__cxx03/__utility/exception_guard.h b/libcxx/include/__cxx03/__utility/exception_guard.h
index a72f77b4edd12..3ced26c67b1c3 100644
--- a/libcxx/include/__cxx03/__utility/exception_guard.h
+++ b/libcxx/include/__cxx03/__utility/exception_guard.h
@@ -64,12 +64,10 @@ template <class _Rollback>
struct __exception_guard_exceptions {
__exception_guard_exceptions() = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __exception_guard_exceptions(_Rollback __rollback)
+ _LIBCPP_HIDE_FROM_ABI explicit __exception_guard_exceptions(_Rollback __rollback)
: __rollback_(std::move(__rollback)), __completed_(false) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- __exception_guard_exceptions(__exception_guard_exceptions&& __other)
- _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
+ _LIBCPP_HIDE_FROM_ABI __exception_guard_exceptions(__exception_guard_exceptions&& __other)
: __rollback_(std::move(__other.__rollback_)), __completed_(__other.__completed_) {
__other.__completed_ = true;
}
@@ -78,9 +76,9 @@ struct __exception_guard_exceptions {
__exception_guard_exceptions& operator=(__exception_guard_exceptions const&) = delete;
__exception_guard_exceptions& operator=(__exception_guard_exceptions&&) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __complete() _NOEXCEPT { __completed_ = true; }
+ _LIBCPP_HIDE_FROM_ABI void __complete() _NOEXCEPT { __completed_ = true; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__exception_guard_exceptions() {
+ _LIBCPP_HIDE_FROM_ABI ~__exception_guard_exceptions() {
if (!__completed_)
__rollback_();
}
@@ -95,12 +93,9 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_exceptions);
template <class _Rollback>
struct __exception_guard_noexceptions {
__exception_guard_noexceptions() = delete;
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG explicit __exception_guard_noexceptions(_Rollback) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_NODEBUG explicit __exception_guard_noexceptions(_Rollback) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG
- __exception_guard_noexceptions(__exception_guard_noexceptions&& __other)
- _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_NODEBUG __exception_guard_noexceptions(__exception_guard_noexceptions&& __other)
: __completed_(__other.__completed_) {
__other.__completed_ = true;
}
@@ -109,11 +104,9 @@ struct __exception_guard_noexceptions {
__exception_guard_noexceptions& operator=(__exception_guard_noexceptions const&) = delete;
__exception_guard_noexceptions& operator=(__exception_guard_noexceptions&&) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG void __complete() _NOEXCEPT {
- __completed_ = true;
- }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_NODEBUG void __complete() _NOEXCEPT { __completed_ = true; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG ~__exception_guard_noexceptions() {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_NODEBUG ~__exception_guard_noexceptions() {
_LIBCPP_ASSERT_INTERNAL(__completed_, "__exception_guard not completed with exceptions disabled");
}
@@ -132,7 +125,7 @@ using __exception_guard = __exception_guard_exceptions<_Rollback>;
#endif
template <class _Rollback>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __exception_guard<_Rollback> __make_exception_guard(_Rollback __rollback) {
+_LIBCPP_HIDE_FROM_ABI __exception_guard<_Rollback> __make_exception_guard(_Rollback __rollback) {
return __exception_guard<_Rollback>(std::move(__rollback));
}
diff --git a/libcxx/include/__cxx03/__utility/forward.h b/libcxx/include/__cxx03/__utility/forward.h
index fc0b45a0ed7ce..091ce5b9dbd02 100644
--- a/libcxx/include/__cxx03/__utility/forward.h
+++ b/libcxx/include/__cxx03/__utility/forward.h
@@ -21,13 +21,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _Tp&&
forward(_LIBCPP_LIFETIMEBOUND __libcpp_remove_reference_t<_Tp>& __t) _NOEXCEPT {
return static_cast<_Tp&&>(__t);
}
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _Tp&&
forward(_LIBCPP_LIFETIMEBOUND __libcpp_remove_reference_t<_Tp>&& __t) _NOEXCEPT {
static_assert(!is_lvalue_reference<_Tp>::value, "cannot forward an rvalue as an lvalue");
return static_cast<_Tp&&>(__t);
diff --git a/libcxx/include/__cxx03/__utility/is_pointer_in_range.h b/libcxx/include/__cxx03/__utility/is_pointer_in_range.h
index 4d7d3c5e039f2..2da13106adb02 100644
--- a/libcxx/include/__cxx03/__utility/is_pointer_in_range.h
+++ b/libcxx/include/__cxx03/__utility/is_pointer_in_range.h
@@ -33,7 +33,7 @@ struct __is_less_than_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>()
};
template <class _Tp, class _Up, __enable_if_t<__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(std::__is_valid_range(__begin, __end), "[__begin, __end) is not a valid range");
@@ -48,7 +48,7 @@ __is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
}
template <class _Tp, class _Up, __enable_if_t<!__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
if (__libcpp_is_constant_evaluated())
return false;
diff --git a/libcxx/include/__cxx03/__utility/is_valid_range.h b/libcxx/include/__cxx03/__utility/is_valid_range.h
index b3770c2c428b0..0d601c75f6017 100644
--- a/libcxx/include/__cxx03/__utility/is_valid_range.h
+++ b/libcxx/include/__cxx03/__utility/is_valid_range.h
@@ -20,8 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
-__is_valid_range(const _Tp* __first, const _Tp* __last) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool __is_valid_range(const _Tp* __first, const _Tp* __last) {
if (__libcpp_is_constant_evaluated()) {
// If this is not a constant during constant evaluation, that is because __first and __last are not
// part of the same allocation. If they are part of the same allocation, we must still make sure they
diff --git a/libcxx/include/__cxx03/__utility/move.h b/libcxx/include/__cxx03/__utility/move.h
index 18692ba9ec128..99b158b18adf2 100644
--- a/libcxx/include/__cxx03/__utility/move.h
+++ b/libcxx/include/__cxx03/__utility/move.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __libcpp_remove_reference_t<_Tp>&&
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI __libcpp_remove_reference_t<_Tp>&&
move(_LIBCPP_LIFETIMEBOUND _Tp&& __t) _NOEXCEPT {
typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;
return static_cast<_Up&&>(__t);
@@ -37,7 +37,7 @@ using __move_if_noexcept_result_t =
__conditional_t<!is_nothrow_move_constructible<_Tp>::value && is_copy_constructible<_Tp>::value, const _Tp&, _Tp&&>;
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __move_if_noexcept_result_t<_Tp>
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI __move_if_noexcept_result_t<_Tp>
move_if_noexcept(_LIBCPP_LIFETIMEBOUND _Tp& __x) _NOEXCEPT {
return std::move(__x);
}
diff --git a/libcxx/include/__cxx03/__utility/no_destroy.h b/libcxx/include/__cxx03/__utility/no_destroy.h
index 5c3dfc5d81e65..3512fe101880f 100644
--- a/libcxx/include/__cxx03/__utility/no_destroy.h
+++ b/libcxx/include/__cxx03/__utility/no_destroy.h
@@ -30,7 +30,7 @@ struct __uninitialized_tag {};
// initialization using __emplace.
template <class _Tp>
struct __no_destroy {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __no_destroy(__uninitialized_tag) : __obj_() {}
+ _LIBCPP_HIDE_FROM_ABI explicit __no_destroy(__uninitialized_tag) : __obj_() {}
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI explicit __no_destroy(_Args&&... __args) {
diff --git a/libcxx/include/__cxx03/__utility/pair.h b/libcxx/include/__cxx03/__utility/pair.h
index 765f4b48ac05b..fcd0dccf9b5fb 100644
--- a/libcxx/include/__cxx03/__utility/pair.h
+++ b/libcxx/include/__cxx03/__utility/pair.h
@@ -52,9 +52,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class, class>
struct __non_trivially_copyable_base {
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __non_trivially_copyable_base() _NOEXCEPT {}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
- __non_trivially_copyable_base(__non_trivially_copyable_base const&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __non_trivially_copyable_base() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __non_trivially_copyable_base(__non_trivially_copyable_base const&) _NOEXCEPT {}
};
template <class _T1, class _T2>
@@ -128,8 +127,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(pair& __p)
- _NOEXCEPT_(__is_nothrow_swappable_v<first_type>&& __is_nothrow_swappable_v<second_type>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(pair& __p) {
using std::swap;
swap(first, __p.first);
swap(second, __p.second);
@@ -139,50 +137,42 @@ struct _LIBCPP_TEMPLATE_VIS pair
// [pairs.spec], specialized algorithms
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator==(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return __x.first == __y.first && __x.second == __y.second;
}
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator!=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return !(__x == __y);
}
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator<(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second);
}
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator>(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return __y < __x;
}
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator>=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return !(__x < __y);
}
template <class _T1, class _T2, class _U1, class _U2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator<=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const pair<_T1, _T2>& __x, const pair<_U1, _U2>& __y) {
return !(__y < __x);
}
template <class _T1, class _T2, __enable_if_t<__is_swappable_v<_T1> && __is_swappable_v<_T2>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
- _NOEXCEPT_(__is_nothrow_swappable_v<_T1>&& __is_nothrow_swappable_v<_T2>) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) {
__x.swap(__y);
}
template <class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
+inline _LIBCPP_HIDE_FROM_ABI pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
make_pair(_T1&& __t1, _T2&& __t2) {
return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>(
std::forward<_T1>(__t1), std::forward<_T2>(__t2));
@@ -212,22 +202,22 @@ struct __get_pair;
template <>
struct __get_pair<0> {
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T1& get(pair<_T1, _T2>& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI _T1& get(pair<_T1, _T2>& __p) _NOEXCEPT {
return __p.first;
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T1& get(const pair<_T1, _T2>& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const _T1& get(const pair<_T1, _T2>& __p) _NOEXCEPT {
return __p.first;
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T1&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI _T1&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {
return std::forward<_T1>(__p.first);
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T1&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const _T1&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT {
return std::forward<const _T1>(__p.first);
}
};
@@ -235,46 +225,44 @@ struct __get_pair<0> {
template <>
struct __get_pair<1> {
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T2& get(pair<_T1, _T2>& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI _T2& get(pair<_T1, _T2>& __p) _NOEXCEPT {
return __p.second;
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T2& get(const pair<_T1, _T2>& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const _T2& get(const pair<_T1, _T2>& __p) _NOEXCEPT {
return __p.second;
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T2&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI _T2&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {
return std::forward<_T2>(__p.second);
}
template <class _T1, class _T2>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T2&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI const _T2&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT {
return std::forward<const _T2>(__p.second);
}
};
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(pair<_T1, _T2>& __p) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(pair<_T1, _T2>& __p) _NOEXCEPT {
return __get_pair<_Ip>::get(__p);
}
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
+inline _LIBCPP_HIDE_FROM_ABI const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(const pair<_T1, _T2>& __p) _NOEXCEPT {
return __get_pair<_Ip>::get(__p);
}
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
-get(pair<_T1, _T2>&& __p) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {
return __get_pair<_Ip>::get(std::move(__p));
}
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
+inline _LIBCPP_HIDE_FROM_ABI const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(const pair<_T1, _T2>&& __p) _NOEXCEPT {
return __get_pair<_Ip>::get(std::move(__p));
}
diff --git a/libcxx/include/__cxx03/__utility/rel_ops.h b/libcxx/include/__cxx03/__utility/rel_ops.h
index b8fadd4d86227..803aaaa7b45e6 100644
--- a/libcxx/include/__cxx03/__utility/rel_ops.h
+++ b/libcxx/include/__cxx03/__utility/rel_ops.h
@@ -20,22 +20,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace rel_ops {
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator!=(const _Tp& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const _Tp& __x, const _Tp& __y) {
return !(__x == __y);
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>(const _Tp& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(const _Tp& __x, const _Tp& __y) {
return __y < __x;
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator<=(const _Tp& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const _Tp& __x, const _Tp& __y) {
return !(__y < __x);
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>=(const _Tp& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const _Tp& __x, const _Tp& __y) {
return !(__x < __y);
}
diff --git a/libcxx/include/__cxx03/__utility/swap.h b/libcxx/include/__cxx03/__utility/swap.h
index 6b9a8e20323ae..df29e1e388784 100644
--- a/libcxx/include/__cxx03/__utility/swap.h
+++ b/libcxx/include/__cxx03/__utility/swap.h
@@ -32,16 +32,14 @@ template <class>
using __swap_result_t = void;
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_SINCE_CXX20 swap(_Tp& __x, _Tp& __y)
- _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) {
+inline _LIBCPP_HIDE_FROM_ABI __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y) {
_Tp __t(std::move(__x));
__x = std::move(__y);
__y = std::move(__t);
}
template <class _Tp, size_t _Np, __enable_if_t<__is_swappable_v<_Tp>, int> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np])
- _NOEXCEPT_(__is_nothrow_swappable_v<_Tp>) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) {
for (size_t __i = 0; __i != _Np; ++__i) {
swap(__a[__i], __b[__i]);
}
diff --git a/libcxx/include/__cxx03/array b/libcxx/include/__cxx03/array
index 4dfebaa9708db..d98204704663d 100644
--- a/libcxx/include/__cxx03/array
+++ b/libcxx/include/__cxx03/array
@@ -182,80 +182,80 @@ struct _LIBCPP_TEMPLATE_VIS array {
_Tp __elems_[_Size];
// No explicit construct/copy/destroy for aggregate type
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void fill(const value_type& __u) {
+ _LIBCPP_HIDE_FROM_ABI void fill(const value_type& __u) {
std::fill_n(data(), _Size, __u);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable_v<_Tp>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(array& __a) {
std::swap_ranges(data(), data() + _Size, __a.data());
}
// iterators:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin() _NOEXCEPT { return iterator(data()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator begin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(data()); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT {
return const_iterator(data());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end() _NOEXCEPT { return iterator(data() + _Size); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator end() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return iterator(data() + _Size); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {
return const_iterator(data() + _Size);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator rbegin() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {
return reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator rbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
return const_reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator rend() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {
return reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator rend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
return const_reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin() const _NOEXCEPT { return begin(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend() const _NOEXCEPT { return end(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return begin(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return end(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
return rbegin();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
// capacity:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT { return _Size; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT { return _Size; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT { return _Size == 0; }
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return _Size; }
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return _Size; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return _Size == 0; }
// element access:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](size_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < _Size, "out-of-bounds access in std::array<T, N>");
return __elems_[__n];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference operator[](size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < _Size, "out-of-bounds access in std::array<T, N>");
return __elems_[__n];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type __n) {
+ _LIBCPP_HIDE_FROM_ABI reference at(size_type __n) {
if (__n >= _Size)
__throw_out_of_range("array::at");
return __elems_[__n];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const {
if (__n >= _Size)
__throw_out_of_range("array::at");
return __elems_[__n];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front() _NOEXCEPT { return (*this)[0]; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front() const _NOEXCEPT { return (*this)[0]; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back() _NOEXCEPT { return (*this)[_Size - 1]; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference back() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT { return (*this)[0]; }
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT { return (*this)[0]; }
+ _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT { return (*this)[_Size - 1]; }
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
return (*this)[_Size - 1];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 value_type* data() _NOEXCEPT { return __elems_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const value_type* data() const _NOEXCEPT { return __elems_; }
+ _LIBCPP_HIDE_FROM_ABI value_type* data() _NOEXCEPT { return __elems_; }
+ _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT { return __elems_; }
};
template <class _Tp>
@@ -281,97 +281,97 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
};
_ALIGNAS_TYPE(_ArrayInStructT) _EmptyType __elems_[sizeof(_ArrayInStructT)];
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 value_type* data() _NOEXCEPT { return nullptr; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const value_type* data() const _NOEXCEPT { return nullptr; }
+ _LIBCPP_HIDE_FROM_ABI value_type* data() _NOEXCEPT { return nullptr; }
+ _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT { return nullptr; }
// No explicit construct/copy/destroy for aggregate type
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void fill(const value_type&) {
+ _LIBCPP_HIDE_FROM_ABI void fill(const value_type&) {
static_assert(!is_const<_Tp>::value, "cannot fill zero-sized array of type 'const T'");
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(array&) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void swap(array&) _NOEXCEPT {
static_assert(!is_const<_Tp>::value, "cannot swap zero-sized array of type 'const T'");
}
// iterators:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin() _NOEXCEPT { return iterator(data()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator begin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(data()); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT {
return const_iterator(data());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end() _NOEXCEPT { return iterator(data()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator end() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return iterator(data()); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {
return const_iterator(data());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator rbegin() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {
return reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator rbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
return const_reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator rend() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {
return reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator rend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
return const_reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin() const _NOEXCEPT { return begin(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend() const _NOEXCEPT { return end(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return begin(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return end(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
return rbegin();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
// capacity:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT { return 0; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT { return 0; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT { return true; }
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return 0; }
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return 0; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return true; }
// element access:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](size_type) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_type) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference operator[](size_type) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type) {
+ _LIBCPP_HIDE_FROM_ABI reference at(size_type) {
__throw_out_of_range("array<T, 0>::at");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type) const {
+ _LIBCPP_HIDE_FROM_ABI const_reference at(size_type) const {
__throw_out_of_range("array<T, 0>::at");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::front() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::front() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::back() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference back() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::back() on a zero-sized array");
__libcpp_unreachable();
}
};
template <class _Tp, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
return std::equal(__x.begin(), __x.end(), __y.begin());
}
@@ -402,8 +402,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const array<_Tp, _Size>& __x, const
}
template <class _Tp, size_t _Size, __enable_if_t<_Size == 0 || __is_swappable_v<_Tp>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
- _NOEXCEPT_(noexcept(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y) {
__x.swap(__y);
}
@@ -417,25 +416,25 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> > {
};
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>& __a) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI _Tp& get(array<_Tp, _Size>& __a) _NOEXCEPT {
static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array)");
return __a.__elems_[_Ip];
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>& __a) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI const _Tp& get(const array<_Tp, _Size>& __a) _NOEXCEPT {
static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array)");
return __a.__elems_[_Ip];
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&& __a) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI _Tp&& get(array<_Tp, _Size>&& __a) _NOEXCEPT {
static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)");
return std::move(__a.__elems_[_Ip]);
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&& __a) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI const _Tp&& get(const array<_Tp, _Size>&& __a) _NOEXCEPT {
static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array &&)");
return std::move(__a.__elems_[_Ip]);
}
diff --git a/libcxx/include/__cxx03/bitset b/libcxx/include/__cxx03/bitset
index 7d22f8e45967c..63d2c23a73bdc 100644
--- a/libcxx/include/__cxx03/bitset
+++ b/libcxx/include/__cxx03/bitset
@@ -189,52 +189,51 @@ protected:
typedef __bit_iterator<__bitset, false> iterator;
typedef __bit_iterator<__bitset, true> const_iterator;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t __pos) _NOEXCEPT {
return reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t __pos) const _NOEXCEPT {
return const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t __pos) _NOEXCEPT {
return iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t __pos) const _NOEXCEPT {
return const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator&=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator|=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator^=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator|=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator^=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const {
+ _LIBCPP_HIDE_FROM_ABI void flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong() const {
return to_ulong(integral_constant < bool, _Size< sizeof(unsigned long) * CHAR_BIT>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const {
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong() const {
return to_ullong(integral_constant < bool, _Size< sizeof(unsigned long long) * CHAR_BIT>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool all() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool any() const _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT;
private:
void __init(unsigned long long __v, false_type) _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI void __init(unsigned long long __v, true_type) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong(false_type) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong(true_type) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong(false_type) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong(true_type) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong(true_type, false_type) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong(true_type, true_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong(false_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong(true_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong(false_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong(true_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong(true_type, false_type) const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong(true_type, true_type) const;
};
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_CONSTEXPR __bitset<_N_words, _Size>::__bitset() _NOEXCEPT
-{
+inline __bitset<_N_words, _Size>::__bitset() _NOEXCEPT {
std::fill_n(__first_, _N_words, __storage_type(0));
}
@@ -263,34 +262,30 @@ inline _LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::__init(unsigned lon
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_CONSTEXPR __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
-{
+inline __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT {
__init(__v, integral_constant<bool, sizeof(unsigned long long) == sizeof(__storage_type)>());
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT {
for (size_type __i = 0; __i < _N_words; ++__i)
__first_[__i] &= __v.__first_[__i];
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT {
for (size_type __i = 0; __i < _N_words; ++__i)
__first_[__i] |= __v.__first_[__i];
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT {
for (size_type __i = 0; __i < _N_words; ++__i)
__first_[__i] ^= __v.__first_[__i];
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void __bitset<_N_words, _Size>::flip() _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::flip() _NOEXCEPT {
// do middle whole words
size_type __n = _Size;
__storage_pointer __p = __first_;
@@ -306,8 +301,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void __bitset<_N_words, _Siz
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
-__bitset<_N_words, _Size>::to_ulong(false_type) const {
+_LIBCPP_HIDE_FROM_ABI unsigned long __bitset<_N_words, _Size>::to_ulong(false_type) const {
const_iterator __e = __make_iter(_Size);
const_iterator __i = std::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true);
if (__i != __e)
@@ -317,14 +311,12 @@ __bitset<_N_words, _Size>::to_ulong(false_type) const {
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
-__bitset<_N_words, _Size>::to_ulong(true_type) const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long __bitset<_N_words, _Size>::to_ulong(true_type) const {
return __first_[0];
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
-__bitset<_N_words, _Size>::to_ullong(false_type) const {
+_LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<_N_words, _Size>::to_ullong(false_type) const {
const_iterator __e = __make_iter(_Size);
const_iterator __i = std::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true);
if (__i != __e)
@@ -334,20 +326,17 @@ __bitset<_N_words, _Size>::to_ullong(false_type) const {
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
-__bitset<_N_words, _Size>::to_ullong(true_type) const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type) const {
return to_ullong(true_type(), integral_constant<bool, sizeof(__storage_type) < sizeof(unsigned long long)>());
}
template <size_t _N_words, size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
-__bitset<_N_words, _Size>::to_ullong(true_type, false_type) const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, false_type) const {
return __first_[0];
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
-__bitset<_N_words, _Size>::to_ullong(true_type, true_type) const {
+_LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const {
unsigned long long __r = __first_[0];
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshift-count-overflow")
@@ -358,7 +347,7 @@ __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const {
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Size>::all() const _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __bitset<_N_words, _Size>::all() const _NOEXCEPT {
// do middle whole words
size_type __n = _Size;
__const_storage_pointer __p = __first_;
@@ -375,7 +364,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Siz
}
template <size_t _N_words, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Size>::any() const _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __bitset<_N_words, _Size>::any() const _NOEXCEPT {
// do middle whole words
size_type __n = _Size;
__const_storage_pointer __p = __first_;
@@ -425,88 +414,85 @@ protected:
typedef __bit_iterator<__bitset, false> iterator;
typedef __bit_iterator<__bitset, true> const_iterator;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t __pos) _NOEXCEPT {
return reference(&__first_, __storage_type(1) << __pos);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t __pos) const _NOEXCEPT {
return const_reference(&__first_, __storage_type(1) << __pos);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t __pos) _NOEXCEPT {
return iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t __pos) const _NOEXCEPT {
return const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator&=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator|=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator^=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator|=(const __bitset& __v) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void operator^=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void flip() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong() const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong() const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool all() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool any() const _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT;
};
template <size_t _Size>
-inline _LIBCPP_CONSTEXPR __bitset<1, _Size>::__bitset() _NOEXCEPT : __first_(0) {}
+inline __bitset<1, _Size>::__bitset() _NOEXCEPT : __first_(0) {}
template <size_t _Size>
-inline _LIBCPP_CONSTEXPR __bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
+inline __bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
: __first_(_Size == __bits_per_word ? static_cast<__storage_type>(__v)
: static_cast<__storage_type>(__v) & ((__storage_type(1) << _Size) - 1)) {}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT {
__first_ &= __v.__first_;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT {
__first_ |= __v.__first_;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
-__bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT {
__first_ ^= __v.__first_;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void __bitset<1, _Size>::flip() _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void __bitset<1, _Size>::flip() _NOEXCEPT {
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
__first_ = ~__first_;
__first_ &= __m;
}
template <size_t _Size>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long __bitset<1, _Size>::to_ulong() const {
+inline unsigned long __bitset<1, _Size>::to_ulong() const {
return __first_;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __bitset<1, _Size>::to_ullong() const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<1, _Size>::to_ullong() const {
return __first_;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<1, _Size>::all() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool __bitset<1, _Size>::all() const _NOEXCEPT {
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
return !(~__first_ & __m);
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<1, _Size>::any() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool __bitset<1, _Size>::any() const _NOEXCEPT {
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
return __first_ & __m;
}
@@ -540,40 +526,32 @@ protected:
typedef __bit_iterator<__bitset, false> iterator;
typedef __bit_iterator<__bitset, true> const_iterator;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t) _NOEXCEPT {
- return reference(nullptr, 1);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT {
- return const_reference(nullptr, 1);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t) _NOEXCEPT {
- return iterator(nullptr, 0);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t) const _NOEXCEPT {
- return const_iterator(nullptr, 0);
- }
+ _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t) _NOEXCEPT { return reference(nullptr, 1); }
+ _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t) const _NOEXCEPT { return const_reference(nullptr, 1); }
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t) _NOEXCEPT { return iterator(nullptr, 0); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t) const _NOEXCEPT { return const_iterator(nullptr, 0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator&=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator|=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator^=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void operator|=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void operator^=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void flip() _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const { return 0; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const { return 0; }
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong() const { return 0; }
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong() const { return 0; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT { return true; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT { return false; }
+ _LIBCPP_HIDE_FROM_ABI bool all() const _NOEXCEPT { return true; }
+ _LIBCPP_HIDE_FROM_ABI bool any() const _NOEXCEPT { return false; }
_LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT { return 0; }
};
-inline _LIBCPP_CONSTEXPR __bitset<0, 0>::__bitset() _NOEXCEPT {}
+inline __bitset<0, 0>::__bitset() _NOEXCEPT {}
-inline _LIBCPP_CONSTEXPR __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT {}
+inline __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT {}
template <size_t _Size>
class _LIBCPP_TEMPLATE_VIS bitset;
@@ -592,21 +570,20 @@ public:
typedef typename base::const_reference const_reference;
// 23.3.5.1 constructors:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
+ _LIBCPP_HIDE_FROM_ABI bitset() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
template <class _CharT, __enable_if_t<_IsCharLikeType<_CharT>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit bitset(
+ _LIBCPP_HIDE_FROM_ABI explicit bitset(
const _CharT* __str,
typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
- _CharT __zero = _CharT('0'),
- _CharT __one = _CharT('1')) {
-
+ _CharT __zero = _CharT('0'),
+ _CharT __one = _CharT('1')) {
size_t __rlen = std::min(__n, char_traits<_CharT>::length(__str));
__init_from_string_view(basic_string_view<_CharT>(__str, __rlen), __zero, __one);
}
template <class _CharT, class _Traits, class _Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit bitset(
+ _LIBCPP_HIDE_FROM_ABI explicit bitset(
const basic_string<_CharT, _Traits, _Allocator>& __str,
typename basic_string<_CharT, _Traits, _Allocator>::size_type __pos = 0,
typename basic_string<_CharT, _Traits, _Allocator>::size_type __n =
@@ -621,53 +598,53 @@ public:
}
// 23.3.5.2 bitset operations:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& operator<<=(size_t __pos) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& operator>>=(size_t __pos) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& set() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& set(size_t __pos, bool __val = true);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& reset() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& reset(size_t __pos);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset operator~() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& flip() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset& flip(size_t __pos);
+ _LIBCPP_HIDE_FROM_ABI bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& operator<<=(size_t __pos) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& operator>>=(size_t __pos) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& set() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& set(size_t __pos, bool __val = true);
+ _LIBCPP_HIDE_FROM_ABI bitset& reset() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& reset(size_t __pos);
+ _LIBCPP_HIDE_FROM_ABI bitset operator~() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset& flip(size_t __pos);
// element access:
#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator[](size_t __p) const { return base::__make_ref(__p); }
+ _LIBCPP_HIDE_FROM_ABI bool operator[](size_t __p) const { return base::__make_ref(__p); }
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const { return base::__make_ref(__p); }
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_t __p) const { return base::__make_ref(__p); }
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator[](size_t __p) { return base::__make_ref(__p); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const;
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __p) { return base::__make_ref(__p); }
+ _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong() const;
+ _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong() const;
template <class _CharT, class _Traits, class _Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
+ _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
to_string(_CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) const;
template <class _CharT, class _Traits>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, allocator<_CharT> >
+ _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, allocator<_CharT> >
to_string(_CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) const;
template <class _CharT>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
+ _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
to_string(_CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<char, char_traits<char>, allocator<char> >
+ _LIBCPP_HIDE_FROM_ABI basic_string<char, char_traits<char>, allocator<char> >
to_string(char __zero = '0', char __one = '1') const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 size_t count() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT { return _Size; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const bitset& __rhs) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_t count() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_t size() const _NOEXCEPT { return _Size; }
+ _LIBCPP_HIDE_FROM_ABI bool operator==(const bitset& __rhs) const _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI bool operator!=(const bitset& __rhs) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool test(size_t __pos) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool none() const _NOEXCEPT { return !any(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset operator<<(size_t __pos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset operator>>(size_t __pos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool test(size_t __pos) const;
+ _LIBCPP_HIDE_FROM_ABI bool all() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool any() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bool none() const _NOEXCEPT { return !any(); }
+ _LIBCPP_HIDE_FROM_ABI bitset operator<<(size_t __pos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI bitset operator>>(size_t __pos) const _NOEXCEPT;
private:
template <class _CharT, class _Traits>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
+ _LIBCPP_HIDE_FROM_ABI void
__init_from_string_view(basic_string_view<_CharT, _Traits> __str, _CharT __zero, _CharT __one) {
for (size_t __i = 0; __i < __str.size(); ++__i)
if (!_Traits::eq(__str[__i], __zero) && !_Traits::eq(__str[__i], __one))
@@ -688,28 +665,25 @@ private:
};
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>&
-bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT {
base::operator&=(__rhs);
return *this;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>&
-bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT {
base::operator|=(__rhs);
return *this;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>&
-bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT {
base::operator^=(__rhs);
return *this;
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT {
__pos = std::min(__pos, _Size);
std::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size));
std::fill_n(base::__make_iter(0), __pos, false);
@@ -717,7 +691,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT {
__pos = std::min(__pos, _Size);
std::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0));
std::fill_n(base::__make_iter(_Size - __pos), __pos, false);
@@ -725,13 +699,13 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::set() _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::set() _NOEXCEPT {
std::fill_n(base::__make_iter(0), _Size, true);
return *this;
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::set(size_t __pos, bool __val) {
+_LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::set(size_t __pos, bool __val) {
if (__pos >= _Size)
__throw_out_of_range("bitset set argument out of range");
@@ -740,13 +714,13 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::reset() _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::reset() _NOEXCEPT {
std::fill_n(base::__make_iter(0), _Size, false);
return *this;
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::reset(size_t __pos) {
+_LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::reset(size_t __pos) {
if (__pos >= _Size)
__throw_out_of_range("bitset reset argument out of range");
@@ -755,20 +729,20 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size> bitset<_Size>::operator~() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> bitset<_Size>::operator~() const _NOEXCEPT {
bitset __x(*this);
__x.flip();
return __x;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::flip() _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::flip() _NOEXCEPT {
base::flip();
return *this;
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>::flip(size_t __pos) {
+_LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::flip(size_t __pos) {
if (__pos >= _Size)
__throw_out_of_range("bitset flip argument out of range");
@@ -778,18 +752,18 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>& bitset<_Size>
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long bitset<_Size>::to_ulong() const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long bitset<_Size>::to_ulong() const {
return base::to_ulong();
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long bitset<_Size>::to_ullong() const {
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long bitset<_Size>::to_ullong() const {
return base::to_ullong();
}
template <size_t _Size>
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const {
basic_string<_CharT, _Traits, _Allocator> __r(_Size, __zero);
for (size_t __i = 0; __i != _Size; ++__i) {
@@ -801,32 +775,31 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const {
template <size_t _Size>
template <class _CharT, class _Traits>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, _Traits, allocator<_CharT> >
+inline _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const {
return to_string<_CharT, _Traits, allocator<_CharT> >(__zero, __one);
}
template <size_t _Size>
template <class _CharT>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
+inline _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const {
return to_string<_CharT, char_traits<_CharT>, allocator<_CharT> >(__zero, __one);
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 basic_string<char, char_traits<char>, allocator<char> >
+inline _LIBCPP_HIDE_FROM_ABI basic_string<char, char_traits<char>, allocator<char> >
bitset<_Size>::to_string(char __zero, char __one) const {
return to_string<char, char_traits<char>, allocator<char> >(__zero, __one);
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 size_t bitset<_Size>::count() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI size_t bitset<_Size>::count() const _NOEXCEPT {
return static_cast<size_t>(std::count(base::__make_iter(0), base::__make_iter(_Size), true));
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
-bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT {
return std::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
}
@@ -836,7 +809,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::operator!=(const bitset& __rhs)
}
template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool bitset<_Size>::test(size_t __pos) const {
+_LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::test(size_t __pos) const {
if (__pos >= _Size)
__throw_out_of_range("bitset test argument out of range");
@@ -844,50 +817,45 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool bitset<_Size>::test(siz
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool bitset<_Size>::all() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::all() const _NOEXCEPT {
return base::all();
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool bitset<_Size>::any() const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::any() const _NOEXCEPT {
return base::any();
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>
-bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT {
bitset __r = *this;
__r <<= __pos;
return __r;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>
-bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT {
bitset __r = *this;
__r >>= __pos;
return __r;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>
-operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
bitset<_Size> __r = __x;
__r &= __y;
return __r;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>
-operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
bitset<_Size> __r = __x;
__r |= __y;
return __r;
}
template <size_t _Size>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bitset<_Size>
-operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
bitset<_Size> __r = __x;
__r ^= __y;
return __r;
diff --git a/libcxx/include/__cxx03/cmath b/libcxx/include/__cxx03/cmath
index 2f515cd4fb5a9..4de9c59406c12 100644
--- a/libcxx/include/__cxx03/cmath
+++ b/libcxx/include/__cxx03/cmath
@@ -554,7 +554,7 @@ using ::tgammal _LIBCPP_USING_IF_EXISTS;
using ::truncl _LIBCPP_USING_IF_EXISTS;
template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT {
#if __has_builtin(__builtin_isnan)
return __builtin_isnan(__lcpp_x);
#else
@@ -563,12 +563,12 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NO
}
template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT {
return std::isnan(__lcpp_x);
}
template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT {
#if __has_builtin(__builtin_isinf)
return __builtin_isinf(__lcpp_x);
#else
@@ -577,12 +577,12 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NO
}
template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT {
return std::isinf(__lcpp_x);
}
template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT {
#if __has_builtin(__builtin_isfinite)
return __builtin_isfinite(__lcpp_x);
#else
@@ -591,7 +591,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isfinite(_A1 __lcpp_x)
}
template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT {
return __builtin_isfinite(__lcpp_x);
}
diff --git a/libcxx/include/__cxx03/codecvt b/libcxx/include/__cxx03/codecvt
index 003ebfbf713e5..b996ea404b1cc 100644
--- a/libcxx/include/__cxx03/codecvt
+++ b/libcxx/include/__cxx03/codecvt
@@ -64,14 +64,14 @@ class codecvt_utf8_utf16
_LIBCPP_BEGIN_NAMESPACE_STD
-enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 };
+enum codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 };
// codecvt_utf8
template <class _Elem>
class __codecvt_utf8;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8<wchar_t> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -110,7 +110,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
@@ -188,7 +188,7 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
+class _LIBCPP_TEMPLATE_VIS codecvt_utf8 : public __codecvt_utf8<_Elem> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf8(size_t __refs = 0) : __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {}
@@ -201,7 +201,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Elem, bool _LittleEndian>
class __codecvt_utf16;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<wchar_t, false> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -279,7 +279,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
@@ -431,11 +431,11 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
+class _LIBCPP_TEMPLATE_VIS codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf16(size_t __refs = 0)
- : __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
+ : __codecvt_utf16 < _Elem,
+ _Mode & little_endian > (__refs, _Maxcode, _Mode) {}
_LIBCPP_HIDE_FROM_ABI ~codecvt_utf16() {}
};
@@ -446,7 +446,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Elem>
class __codecvt_utf8_utf16;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8_utf16<wchar_t> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -485,7 +485,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
@@ -563,7 +563,7 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> {
+class _LIBCPP_TEMPLATE_VIS codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf8_utf16(size_t __refs = 0)
: __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {}
diff --git a/libcxx/include/__cxx03/complex b/libcxx/include/__cxx03/complex
index d670a0b69c458..d7b9976a016d5 100644
--- a/libcxx/include/__cxx03/complex
+++ b/libcxx/include/__cxx03/complex
@@ -283,20 +283,16 @@ template <class _Tp>
class _LIBCPP_TEMPLATE_VIS complex;
template <class _Tp, __enable_if_t<is_floating_point<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
template <class _Tp, __enable_if_t<!is_floating_point<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
template <class _Tp, __enable_if_t<is_floating_point<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template <class _Tp, __enable_if_t<!is_floating_point<_Tp>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template <class _Tp>
class _LIBCPP_TEMPLATE_VIS complex {
@@ -308,68 +304,66 @@ private:
value_type __im_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
- complex(const value_type& __re = value_type(), const value_type& __im = value_type())
+ _LIBCPP_HIDE_FROM_ABI complex(const value_type& __re = value_type(), const value_type& __im = value_type())
: __re_(__re), __im_(__im) {}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 complex(const complex<_Xp>& __c)
- : __re_(__c.real()), __im_(__c.imag()) {}
+ _LIBCPP_HIDE_FROM_ABI complex(const complex<_Xp>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 value_type real() const { return __re_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 value_type imag() const { return __im_; }
+ _LIBCPP_HIDE_FROM_ABI value_type real() const { return __re_; }
+ _LIBCPP_HIDE_FROM_ABI value_type imag() const { return __im_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void real(value_type __re) { __re_ = __re; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void imag(value_type __im) { __im_ = __im; }
+ _LIBCPP_HIDE_FROM_ABI void real(value_type __re) { __re_ = __re; }
+ _LIBCPP_HIDE_FROM_ABI void imag(value_type __im) { __im_ = __im; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(const value_type& __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(const value_type& __re) {
__re_ = __re;
__im_ = value_type();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(const value_type& __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(const value_type& __re) {
__re_ += __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(const value_type& __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(const value_type& __re) {
__re_ -= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(const value_type& __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(const value_type& __re) {
__re_ *= __re;
__im_ *= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(const value_type& __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(const value_type& __re) {
__re_ /= __re;
__im_ /= __re;
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(const complex<_Xp>& __c) {
__re_ = __c.real();
__im_ = __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(const complex<_Xp>& __c) {
__re_ += __c.real();
__im_ += __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(const complex<_Xp>& __c) {
__re_ -= __c.real();
__im_ -= __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(const complex<_Xp>& __c) {
*this = *this * complex(__c.real(), __c.imag());
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(const complex<_Xp>& __c) {
*this = *this / complex(__c.real(), __c.imag());
return *this;
}
@@ -389,7 +383,7 @@ using __complex_t =
__conditional_t<is_same<_Tp, double>::value, _Complex double, _Complex long double> >;
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __complex_t<_Tp> __make_complex(_Tp __re, _Tp __im) {
+_LIBCPP_HIDE_FROM_ABI __complex_t<_Tp> __make_complex(_Tp __re, _Tp __im) {
#if __has_builtin(__builtin_complex)
return __builtin_complex(__re, __im);
#else
@@ -405,76 +399,75 @@ class _LIBCPP_TEMPLATE_VIS complex<float> {
public:
typedef float value_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(float __re = 0.0f, float __im = 0.0f) : __re_(__re), __im_(__im) {}
+ _LIBCPP_HIDE_FROM_ABI complex(float __re = 0.0f, float __im = 0.0f) : __re_(__re), __im_(__im) {}
template <class _Tag, __enable_if_t<_IsSame<_Tag, __from_builtin_tag>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit complex(_Tag, _Complex float __v)
- : __re_(__real__ __v), __im_(__imag__ __v) {}
+ _LIBCPP_HIDE_FROM_ABI explicit complex(_Tag, _Complex float __v) : __re_(__real__ __v), __im_(__imag__ __v) {}
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
+ _LIBCPP_HIDE_FROM_ABI explicit complex(const complex<double>& __c);
+ _LIBCPP_HIDE_FROM_ABI explicit complex(const complex<long double>& __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR float real() const { return __re_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR float imag() const { return __im_; }
+ _LIBCPP_HIDE_FROM_ABI float real() const { return __re_; }
+ _LIBCPP_HIDE_FROM_ABI float imag() const { return __im_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void real(value_type __re) { __re_ = __re; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void imag(value_type __im) { __im_ = __im; }
+ _LIBCPP_HIDE_FROM_ABI void real(value_type __re) { __re_ = __re; }
+ _LIBCPP_HIDE_FROM_ABI void imag(value_type __im) { __im_ = __im; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Complex float __builtin() const { return std::__make_complex(__re_, __im_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __builtin(_Complex float __f) {
+ _LIBCPP_HIDE_FROM_ABI _Complex float __builtin() const { return std::__make_complex(__re_, __im_); }
+ _LIBCPP_HIDE_FROM_ABI void __builtin(_Complex float __f) {
__re_ = __real__ __f;
__im_ = __imag__ __f;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(float __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(float __re) {
__re_ = __re;
__im_ = value_type();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(float __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(float __re) {
__re_ += __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(float __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(float __re) {
__re_ -= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(float __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(float __re) {
__re_ *= __re;
__im_ *= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(float __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(float __re) {
__re_ /= __re;
__im_ /= __re;
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(const complex<_Xp>& __c) {
__re_ = __c.real();
__im_ = __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(const complex<_Xp>& __c) {
__re_ += __c.real();
__im_ += __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(const complex<_Xp>& __c) {
__re_ -= __c.real();
__im_ -= __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(const complex<_Xp>& __c) {
*this = *this * complex(__c.real(), __c.imag());
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(const complex<_Xp>& __c) {
*this = *this / complex(__c.real(), __c.imag());
return *this;
}
@@ -488,79 +481,76 @@ class _LIBCPP_TEMPLATE_VIS complex<double> {
public:
typedef double value_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(double __re = 0.0, double __im = 0.0) : __re_(__re), __im_(__im) {}
+ _LIBCPP_HIDE_FROM_ABI complex(double __re = 0.0, double __im = 0.0) : __re_(__re), __im_(__im) {}
template <class _Tag, __enable_if_t<_IsSame<_Tag, __from_builtin_tag>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit complex(_Tag, _Complex double __v)
- : __re_(__real__ __v), __im_(__imag__ __v) {}
+ _LIBCPP_HIDE_FROM_ABI explicit complex(_Tag, _Complex double __v) : __re_(__real__ __v), __im_(__imag__ __v) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
+ _LIBCPP_HIDE_FROM_ABI complex(const complex<float>& __c);
+ _LIBCPP_HIDE_FROM_ABI explicit complex(const complex<long double>& __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR double real() const { return __re_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR double imag() const { return __im_; }
+ _LIBCPP_HIDE_FROM_ABI double real() const { return __re_; }
+ _LIBCPP_HIDE_FROM_ABI double imag() const { return __im_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void real(value_type __re) { __re_ = __re; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void imag(value_type __im) { __im_ = __im; }
+ _LIBCPP_HIDE_FROM_ABI void real(value_type __re) { __re_ = __re; }
+ _LIBCPP_HIDE_FROM_ABI void imag(value_type __im) { __im_ = __im; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Complex double __builtin() const {
- return std::__make_complex(__re_, __im_);
- }
+ _LIBCPP_HIDE_FROM_ABI _Complex double __builtin() const { return std::__make_complex(__re_, __im_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __builtin(_Complex double __f) {
+ _LIBCPP_HIDE_FROM_ABI void __builtin(_Complex double __f) {
__re_ = __real__ __f;
__im_ = __imag__ __f;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(double __re) {
__re_ = __re;
__im_ = value_type();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(double __re) {
__re_ += __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(double __re) {
__re_ -= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(double __re) {
__re_ *= __re;
__im_ *= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(double __re) {
__re_ /= __re;
__im_ /= __re;
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(const complex<_Xp>& __c) {
__re_ = __c.real();
__im_ = __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(const complex<_Xp>& __c) {
__re_ += __c.real();
__im_ += __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(const complex<_Xp>& __c) {
__re_ -= __c.real();
__im_ -= __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(const complex<_Xp>& __c) {
*this = *this * complex(__c.real(), __c.imag());
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(const complex<_Xp>& __c) {
*this = *this / complex(__c.real(), __c.imag());
return *this;
}
@@ -574,160 +564,144 @@ class _LIBCPP_TEMPLATE_VIS complex<long double> {
public:
typedef long double value_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(long double __re = 0.0L, long double __im = 0.0L)
- : __re_(__re), __im_(__im) {}
+ _LIBCPP_HIDE_FROM_ABI complex(long double __re = 0.0L, long double __im = 0.0L) : __re_(__re), __im_(__im) {}
template <class _Tag, __enable_if_t<_IsSame<_Tag, __from_builtin_tag>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit complex(_Tag, _Complex long double __v)
- : __re_(__real__ __v), __im_(__imag__ __v) {}
+ _LIBCPP_HIDE_FROM_ABI explicit complex(_Tag, _Complex long double __v) : __re_(__real__ __v), __im_(__imag__ __v) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
+ _LIBCPP_HIDE_FROM_ABI complex(const complex<float>& __c);
+ _LIBCPP_HIDE_FROM_ABI complex(const complex<double>& __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long double real() const { return __re_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long double imag() const { return __im_; }
+ _LIBCPP_HIDE_FROM_ABI long double real() const { return __re_; }
+ _LIBCPP_HIDE_FROM_ABI long double imag() const { return __im_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void real(value_type __re) { __re_ = __re; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void imag(value_type __im) { __im_ = __im; }
+ _LIBCPP_HIDE_FROM_ABI void real(value_type __re) { __re_ = __re; }
+ _LIBCPP_HIDE_FROM_ABI void imag(value_type __im) { __im_ = __im; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Complex long double __builtin() const {
- return std::__make_complex(__re_, __im_);
- }
+ _LIBCPP_HIDE_FROM_ABI _Complex long double __builtin() const { return std::__make_complex(__re_, __im_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __builtin(_Complex long double __f) {
+ _LIBCPP_HIDE_FROM_ABI void __builtin(_Complex long double __f) {
__re_ = __real__ __f;
__im_ = __imag__ __f;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(long double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(long double __re) {
__re_ = __re;
__im_ = value_type();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(long double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(long double __re) {
__re_ += __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(long double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(long double __re) {
__re_ -= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(long double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(long double __re) {
__re_ *= __re;
__im_ *= __re;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(long double __re) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(long double __re) {
__re_ /= __re;
__im_ /= __re;
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator=(const complex<_Xp>& __c) {
__re_ = __c.real();
__im_ = __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator+=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator+=(const complex<_Xp>& __c) {
__re_ += __c.real();
__im_ += __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator-=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator-=(const complex<_Xp>& __c) {
__re_ -= __c.real();
__im_ -= __c.imag();
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator*=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator*=(const complex<_Xp>& __c) {
*this = *this * complex(__c.real(), __c.imag());
return *this;
}
template <class _Xp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex& operator/=(const complex<_Xp>& __c) {
+ _LIBCPP_HIDE_FROM_ABI complex& operator/=(const complex<_Xp>& __c) {
*this = *this / complex(__c.real(), __c.imag());
return *this;
}
};
-inline _LIBCPP_CONSTEXPR complex<float>::complex(const complex<double>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<float>::complex(const complex<double>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
-inline _LIBCPP_CONSTEXPR complex<float>::complex(const complex<long double>& __c)
- : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<float>::complex(const complex<long double>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
-inline _LIBCPP_CONSTEXPR complex<double>::complex(const complex<float>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<double>::complex(const complex<float>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
-inline _LIBCPP_CONSTEXPR complex<double>::complex(const complex<long double>& __c)
- : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<double>::complex(const complex<long double>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
-inline _LIBCPP_CONSTEXPR complex<long double>::complex(const complex<float>& __c)
- : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<long double>::complex(const complex<float>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
-inline _LIBCPP_CONSTEXPR complex<long double>::complex(const complex<double>& __c)
- : __re_(__c.real()), __im_(__c.imag()) {}
+inline complex<long double>::complex(const complex<double>& __c) : __re_(__c.real()), __im_(__c.imag()) {}
// 26.3.6 operators:
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(__x);
__t += __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator+(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator+(const complex<_Tp>& __x, const _Tp& __y) {
complex<_Tp> __t(__x);
__t += __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator+(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator+(const _Tp& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(__y);
__t += __x;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(__x);
__t -= __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator-(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator-(const complex<_Tp>& __x, const _Tp& __y) {
complex<_Tp> __t(__x);
__t -= __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator-(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator-(const _Tp& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(-__y);
__t += __x;
return __t;
}
template <class _Tp, __enable_if_t<is_floating_point<_Tp>::value, int> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const complex<_Tp>& __lhs, const complex<_Tp>& __rhs) {
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __lhs, const complex<_Tp>& __rhs) {
return complex<_Tp>(__from_builtin_tag(), __lhs.__builtin() * __rhs.__builtin());
}
template <class _Tp, __enable_if_t<!is_floating_point<_Tp>::value, int> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const complex<_Tp>& __z, const complex<_Tp>& __w) {
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w) {
_Tp __a = __z.real();
_Tp __b = __z.imag();
_Tp __c = __w.real();
@@ -737,30 +711,26 @@ operator*(const complex<_Tp>& __z, const complex<_Tp>& __w) {
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __x, const _Tp& __y) {
complex<_Tp> __t(__x);
__t *= __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator*(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const _Tp& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(__y);
__t *= __x;
return __t;
}
template <class _Tp, __enable_if_t<is_floating_point<_Tp>::value, int> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const complex<_Tp>& __lhs, const complex<_Tp>& __rhs) {
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __lhs, const complex<_Tp>& __rhs) {
return complex<_Tp>(__from_builtin_tag(), __lhs.__builtin() / __rhs.__builtin());
}
template <class _Tp, __enable_if_t<!is_floating_point<_Tp>::value, int> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const complex<_Tp>& __z, const complex<_Tp>& __w) {
+_LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __z, const complex<_Tp>& __w) {
_Tp __a = __z.real();
_Tp __b = __z.imag();
_Tp __c = __w.real();
@@ -771,58 +741,54 @@ operator/(const complex<_Tp>& __z, const complex<_Tp>& __w) {
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __x, const _Tp& __y) {
return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
-operator/(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const _Tp& __x, const complex<_Tp>& __y) {
complex<_Tp> __t(__x);
__t /= __y;
return __t;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp> operator+(const complex<_Tp>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator+(const complex<_Tp>& __x) {
return __x;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp> operator-(const complex<_Tp>& __x) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator-(const complex<_Tp>& __x) {
return complex<_Tp>(-__x.real(), -__x.imag());
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) {
return __x.real() == __y.real() && __x.imag() == __y.imag();
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator==(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const complex<_Tp>& __x, const _Tp& __y) {
return __x.real() == __y && __x.imag() == 0;
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator==(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const _Tp& __x, const complex<_Tp>& __y) {
return __x == __y.real() && 0 == __y.imag();
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
-operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) {
return !(__x == __y);
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator!=(const complex<_Tp>& __x, const _Tp& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const complex<_Tp>& __x, const _Tp& __y) {
return !(__x == __y);
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator!=(const _Tp& __x, const complex<_Tp>& __y) {
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const _Tp& __x, const complex<_Tp>& __y) {
return !(__x == __y);
}
@@ -848,26 +814,24 @@ struct __libcpp_complex_overload_traits<_Tp, false, true> {
// real
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp real(const complex<_Tp>& __c) {
+inline _LIBCPP_HIDE_FROM_ABI _Tp real(const complex<_Tp>& __c) {
return __c.real();
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __libcpp_complex_overload_traits<_Tp>::_ValueType
-real(_Tp __re) {
+inline _LIBCPP_HIDE_FROM_ABI typename __libcpp_complex_overload_traits<_Tp>::_ValueType real(_Tp __re) {
return __re;
}
// imag
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp imag(const complex<_Tp>& __c) {
+inline _LIBCPP_HIDE_FROM_ABI _Tp imag(const complex<_Tp>& __c) {
return __c.imag();
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __libcpp_complex_overload_traits<_Tp>::_ValueType
-imag(_Tp) {
+inline _LIBCPP_HIDE_FROM_ABI typename __libcpp_complex_overload_traits<_Tp>::_ValueType imag(_Tp) {
return 0;
}
@@ -903,7 +867,7 @@ inline _LIBCPP_HIDE_FROM_ABI float arg(_Tp __re) {
// norm
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp norm(const complex<_Tp>& __c) {
+inline _LIBCPP_HIDE_FROM_ABI _Tp norm(const complex<_Tp>& __c) {
if (std::__constexpr_isinf(__c.real()))
return std::abs(__c.real());
if (std::__constexpr_isinf(__c.imag()))
@@ -912,8 +876,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp norm(const comple
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __libcpp_complex_overload_traits<_Tp>::_ValueType
-norm(_Tp __re) {
+inline _LIBCPP_HIDE_FROM_ABI typename __libcpp_complex_overload_traits<_Tp>::_ValueType norm(_Tp __re) {
typedef typename __libcpp_complex_overload_traits<_Tp>::_ValueType _ValueType;
return static_cast<_ValueType>(__re) * __re;
}
@@ -921,13 +884,12 @@ norm(_Tp __re) {
// conj
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp> conj(const complex<_Tp>& __c) {
+inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> conj(const complex<_Tp>& __c) {
return complex<_Tp>(__c.real(), -__c.imag());
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __libcpp_complex_overload_traits<_Tp>::_ComplexType
-conj(_Tp __re) {
+inline _LIBCPP_HIDE_FROM_ABI typename __libcpp_complex_overload_traits<_Tp>::_ComplexType conj(_Tp __re) {
typedef typename __libcpp_complex_overload_traits<_Tp>::_ComplexType _ComplexType;
return _ComplexType(__re);
}
diff --git a/libcxx/include/__cxx03/cwchar b/libcxx/include/__cxx03/cwchar
index 0d029c0e80286..2f0b82b056980 100644
--- a/libcxx/include/__cxx03/cwchar
+++ b/libcxx/include/__cxx03/cwchar
@@ -193,7 +193,7 @@ using ::putwchar _LIBCPP_USING_IF_EXISTS;
using ::vwprintf _LIBCPP_USING_IF_EXISTS;
using ::wprintf _LIBCPP_USING_IF_EXISTS;
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_wcslen(const wchar_t* __str) {
+inline _LIBCPP_HIDE_FROM_ABI size_t __constexpr_wcslen(const wchar_t* __str) {
#if __has_builtin(__builtin_wcslen)
return __builtin_wcslen(__str);
#else
@@ -207,8 +207,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_wc
#endif
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
-__constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count) {
+inline _LIBCPP_HIDE_FROM_ABI int __constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count) {
#if __has_builtin(__builtin_wmemcmp)
return __builtin_wmemcmp(__lhs, __rhs, __count);
#else
@@ -226,8 +225,8 @@ __constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count)
}
template <class _Tp, class _Up>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
- static_assert(sizeof(_Tp) == sizeof(wchar_t)&& _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
+_LIBCPP_HIDE_FROM_ABI _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
+ static_assert(sizeof(_Tp) == sizeof(wchar_t) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
__libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
"Calling wmemchr on non-trivially equality comparable types is unsafe.");
diff --git a/libcxx/include/__cxx03/deque b/libcxx/include/__cxx03/deque
index 44b31006eba9d..5fe30a4078b73 100644
--- a/libcxx/include/__cxx03/deque
+++ b/libcxx/include/__cxx03/deque
@@ -541,10 +541,7 @@ private:
public:
// construct/copy/destroy:
- _LIBCPP_HIDE_FROM_ABI deque() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __start_(0), __size_(0, __default_init_tag()) {
- __annotate_new(0);
- }
+ _LIBCPP_HIDE_FROM_ABI deque() : __start_(0), __size_(0, __default_init_tag()) { __annotate_new(0); }
_LIBCPP_HIDE_FROM_ABI ~deque() {
clear();
@@ -672,8 +669,7 @@ public:
_LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __p);
_LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __f, const_iterator __l);
- _LIBCPP_HIDE_FROM_ABI void swap(deque& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>);
+ _LIBCPP_HIDE_FROM_ABI void swap(deque& __c);
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI bool __invariants() const {
@@ -698,22 +694,17 @@ public:
return true;
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(deque& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(deque& __c) {
__move_assign_alloc(__c, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(deque& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(deque& __c, true_type) {
__alloc() = std::move(__c.__alloc());
}
_LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(deque&, false_type) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c)
- _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value&&
- is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c) {
__map_ = std::move(__c.__map_);
__start_ = __c.__start_;
__size() = __c.size();
@@ -1066,13 +1057,12 @@ private:
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const deque&, false_type) {}
- _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c, true_type);
_LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c, false_type);
};
template <class _Tp, class _Alloc>
-_LIBCPP_CONSTEXPR const typename allocator_traits<_Alloc>::difference_type deque<_Tp, _Alloc>::__block_size =
+const typename allocator_traits<_Alloc>::difference_type deque<_Tp, _Alloc>::__block_size =
__deque_block_size<value_type, difference_type>::value;
template <class _Tp, class _Allocator>
@@ -2064,9 +2054,7 @@ void deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f) {
}
template <class _Tp, class _Allocator>
-inline void deque<_Tp, _Allocator>::swap(deque& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
-{
+inline void deque<_Tp, _Allocator>::swap(deque& __c) {
__map_.swap(__c.__map_);
std::swap(__start_, __c.__start_);
std::swap(__size(), __c.__size());
@@ -2127,8 +2115,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const deque<_Tp, _Allocator>& __x,
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI void swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/forward_list b/libcxx/include/__cxx03/forward_list
index 40e069bceb485..8a8b5f289e388 100644
--- a/libcxx/include/__cxx03/forward_list
+++ b/libcxx/include/__cxx03/forward_list
@@ -480,8 +480,7 @@ protected:
typedef __forward_list_iterator<__node_pointer> iterator;
typedef __forward_list_const_iterator<__node_pointer> const_iterator;
- _LIBCPP_HIDE_FROM_ABI __forward_list_base() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
- : __before_begin_(__begin_node(), __default_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI __forward_list_base() : __before_begin_(__begin_node(), __default_init_tag()) {}
_LIBCPP_HIDE_FROM_ABI explicit __forward_list_base(const allocator_type& __a)
: __before_begin_(__begin_node(), __node_allocator(__a)) {}
_LIBCPP_HIDE_FROM_ABI explicit __forward_list_base(const __node_allocator& __a)
@@ -498,9 +497,7 @@ protected:
__copy_assign_alloc(__x, integral_constant<bool, __node_traits::propagate_on_container_copy_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__forward_list_base& __x)
- _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__forward_list_base& __x) {
__move_assign_alloc(__x, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>());
}
@@ -531,8 +528,7 @@ protected:
}
public:
- _LIBCPP_HIDE_FROM_ABI void swap(__forward_list_base& __x)
- _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>);
+ _LIBCPP_HIDE_FROM_ABI void swap(__forward_list_base& __x);
protected:
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
@@ -546,8 +542,7 @@ private:
}
_LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__forward_list_base&, false_type) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__forward_list_base& __x, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__forward_list_base& __x, true_type) {
__alloc() = std::move(__x.__alloc());
}
};
@@ -558,9 +553,7 @@ __forward_list_base<_Tp, _Alloc>::~__forward_list_base() {
}
template <class _Tp, class _Alloc>
-inline void __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x)
- _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>)
-{
+inline void __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x) {
std::__swap_allocator(
__alloc(), __x.__alloc(), integral_constant<bool, __node_traits::propagate_on_container_swap::value>());
using std::swap;
@@ -609,8 +602,7 @@ public:
typedef typename base::const_iterator const_iterator;
typedef void __remove_return_type;
- _LIBCPP_HIDE_FROM_ABI forward_list() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value) {
- } // = default;
+ _LIBCPP_HIDE_FROM_ABI forward_list() {} // = default;
_LIBCPP_HIDE_FROM_ABI explicit forward_list(const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI explicit forward_list(size_type __n);
_LIBCPP_HIDE_FROM_ABI forward_list(size_type __n, const value_type& __v);
@@ -683,11 +675,7 @@ public:
_LIBCPP_HIDE_FROM_ABI iterator erase_after(const_iterator __p);
_LIBCPP_HIDE_FROM_ABI iterator erase_after(const_iterator __f, const_iterator __l);
- _LIBCPP_HIDE_FROM_ABI void swap(forward_list& __x)
- _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>)
- {
- base::swap(__x);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(forward_list& __x) { base::swap(__x); }
_LIBCPP_HIDE_FROM_ABI void resize(size_type __n);
_LIBCPP_HIDE_FROM_ABI void resize(size_type __n, const value_type& __v);
@@ -1228,8 +1216,7 @@ operator<=(const forward_list<_Tp, _Alloc>& __x, const forward_list<_Tp, _Alloc>
}
template <class _Tp, class _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI void swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, _Alloc>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/limits b/libcxx/include/__cxx03/limits
index f4f8eb70062a7..174bf8433c3b8 100644
--- a/libcxx/include/__cxx03/limits
+++ b/libcxx/include/__cxx03/limits
@@ -125,64 +125,60 @@ enum float_round_style {
round_toward_neg_infinity = 3
};
-enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style {
- denorm_indeterminate = -1,
- denorm_absent = 0,
- denorm_present = 1
-};
+enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 };
template <class _Tp, bool = is_arithmetic<_Tp>::value>
class __libcpp_numeric_limits {
protected:
typedef _Tp type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return type(); }
-
- static _LIBCPP_CONSTEXPR const int digits = 0;
- static _LIBCPP_CONSTEXPR const int digits10 = 0;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
- static _LIBCPP_CONSTEXPR const bool is_signed = false;
- static _LIBCPP_CONSTEXPR const bool is_integer = false;
- static _LIBCPP_CONSTEXPR const bool is_exact = false;
- static _LIBCPP_CONSTEXPR const int radix = 0;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(); }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = 0;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(); }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
- static _LIBCPP_CONSTEXPR const bool is_bounded = false;
- static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
- static _LIBCPP_CONSTEXPR const bool traps = false;
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+ static const bool is_specialized = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return type(); }
+
+ static const int digits = 0;
+ static const int digits10 = 0;
+ static const int max_digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = 0;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return type(); }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return type(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return type(); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = false;
+ static const bool is_modulo = false;
+
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
};
template <class _Tp, int __digits, bool _IsSigned>
struct __libcpp_compute_min {
- static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
+ static const _Tp value = _Tp(_Tp(1) << __digits);
};
template <class _Tp, int __digits>
struct __libcpp_compute_min<_Tp, __digits, false> {
- static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
+ static const _Tp value = _Tp(0);
};
template <class _Tp>
@@ -190,50 +186,50 @@ class __libcpp_numeric_limits<_Tp, true> {
protected:
typedef _Tp type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
- static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
- static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
- static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
- static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
- static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __min; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __max; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return min(); }
-
- static _LIBCPP_CONSTEXPR const bool is_integer = true;
- static _LIBCPP_CONSTEXPR const bool is_exact = true;
- static _LIBCPP_CONSTEXPR const int radix = 2;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(0); }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = 0;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(0); }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
- static _LIBCPP_CONSTEXPR const bool is_bounded = true;
- static _LIBCPP_CONSTEXPR const bool is_modulo = !std::is_signed<_Tp>::value;
+ static const bool is_specialized = true;
+
+ static const bool is_signed = type(-1) < type(0);
+ static const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
+ static const int digits10 = digits * 3 / 10;
+ static const int max_digits10 = 0;
+ static const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
+ static const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __min; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __max; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return min(); }
+
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return type(0); }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return type(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = !std::is_signed<_Tp>::value;
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || defined(__wasm__)
- static _LIBCPP_CONSTEXPR const bool traps = true;
+ static const bool traps = true;
#else
- static _LIBCPP_CONSTEXPR const bool traps = false;
+ static const bool traps = false;
#endif
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
};
template <>
@@ -241,46 +237,46 @@ class __libcpp_numeric_limits<bool, true> {
protected:
typedef bool type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
- static _LIBCPP_CONSTEXPR const bool is_signed = false;
- static _LIBCPP_CONSTEXPR const int digits = 1;
- static _LIBCPP_CONSTEXPR const int digits10 = 0;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
- static _LIBCPP_CONSTEXPR const type __min = false;
- static _LIBCPP_CONSTEXPR const type __max = true;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __min; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __max; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return min(); }
-
- static _LIBCPP_CONSTEXPR const bool is_integer = true;
- static _LIBCPP_CONSTEXPR const bool is_exact = true;
- static _LIBCPP_CONSTEXPR const int radix = 2;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(0); }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = 0;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent = 0;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(0); }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
- static _LIBCPP_CONSTEXPR const bool is_bounded = true;
- static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
- static _LIBCPP_CONSTEXPR const bool traps = false;
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+ static const bool is_specialized = true;
+
+ static const bool is_signed = false;
+ static const int digits = 1;
+ static const int digits10 = 0;
+ static const int max_digits10 = 0;
+ static const type __min = false;
+ static const type __max = true;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __min; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __max; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return min(); }
+
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return type(0); }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return type(0); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return type(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
};
template <>
@@ -288,56 +284,48 @@ class __libcpp_numeric_limits<float, true> {
protected:
typedef float type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
- static _LIBCPP_CONSTEXPR const bool is_signed = true;
- static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__;
- static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __FLT_MIN__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __FLT_MAX__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
-
- static _LIBCPP_CONSTEXPR const bool is_integer = false;
- static _LIBCPP_CONSTEXPR const bool is_exact = false;
- static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __FLT_EPSILON__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5F; }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
- return __builtin_huge_valf();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {
- return __builtin_nanf("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {
- return __builtin_nansf("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {
- return __FLT_DENORM_MIN__;
- }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
- static _LIBCPP_CONSTEXPR const bool is_bounded = true;
- static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
- static _LIBCPP_CONSTEXPR const bool traps = false;
+ static const bool is_specialized = true;
+
+ static const bool is_signed = true;
+ static const int digits = __FLT_MANT_DIG__;
+ static const int digits10 = __FLT_DIG__;
+ static const int max_digits10 = 2 + (digits * 30103l) / 100000l;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __FLT_MIN__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __FLT_MAX__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return -max(); }
+
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return __FLT_EPSILON__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return 0.5F; }
+
+ static const int min_exponent = __FLT_MIN_EXP__;
+ static const int min_exponent10 = __FLT_MIN_10_EXP__;
+ static const int max_exponent = __FLT_MAX_EXP__;
+ static const int max_exponent10 = __FLT_MAX_10_EXP__;
+
+ static const bool has_infinity = true;
+ static const bool has_quiet_NaN = true;
+ static const bool has_signaling_NaN = true;
+ static const float_denorm_style has_denorm = denorm_present;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return __builtin_huge_valf(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return __builtin_nanf(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return __builtin_nansf(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return __FLT_DENORM_MIN__; }
+
+ static const bool is_iec559 = true;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = false;
#if (defined(__arm__) || defined(__aarch64__))
- static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+ static const bool tinyness_before = true;
#else
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+ static const bool tinyness_before = false;
#endif
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+ static const float_round_style round_style = round_to_nearest;
};
template <>
@@ -345,56 +333,48 @@ class __libcpp_numeric_limits<double, true> {
protected:
typedef double type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
- static _LIBCPP_CONSTEXPR const bool is_signed = true;
- static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__;
- static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __DBL_MIN__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __DBL_MAX__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
-
- static _LIBCPP_CONSTEXPR const bool is_integer = false;
- static _LIBCPP_CONSTEXPR const bool is_exact = false;
- static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __DBL_EPSILON__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5; }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
- return __builtin_huge_val();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {
- return __builtin_nan("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {
- return __builtin_nans("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {
- return __DBL_DENORM_MIN__;
- }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
- static _LIBCPP_CONSTEXPR const bool is_bounded = true;
- static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
- static _LIBCPP_CONSTEXPR const bool traps = false;
+ static const bool is_specialized = true;
+
+ static const bool is_signed = true;
+ static const int digits = __DBL_MANT_DIG__;
+ static const int digits10 = __DBL_DIG__;
+ static const int max_digits10 = 2 + (digits * 30103l) / 100000l;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __DBL_MIN__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __DBL_MAX__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return -max(); }
+
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return __DBL_EPSILON__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return 0.5; }
+
+ static const int min_exponent = __DBL_MIN_EXP__;
+ static const int min_exponent10 = __DBL_MIN_10_EXP__;
+ static const int max_exponent = __DBL_MAX_EXP__;
+ static const int max_exponent10 = __DBL_MAX_10_EXP__;
+
+ static const bool has_infinity = true;
+ static const bool has_quiet_NaN = true;
+ static const bool has_signaling_NaN = true;
+ static const float_denorm_style has_denorm = denorm_present;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return __builtin_huge_val(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return __builtin_nan(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return __builtin_nans(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return __DBL_DENORM_MIN__; }
+
+ static const bool is_iec559 = true;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = false;
#if (defined(__arm__) || defined(__aarch64__))
- static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+ static const bool tinyness_before = true;
#else
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+ static const bool tinyness_before = false;
#endif
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+ static const float_round_style round_style = round_to_nearest;
};
template <>
@@ -402,60 +382,52 @@ class __libcpp_numeric_limits<long double, true> {
protected:
typedef long double type;
- static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
- static _LIBCPP_CONSTEXPR const bool is_signed = true;
- static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__;
- static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
- static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __LDBL_MIN__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __LDBL_MAX__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
-
- static _LIBCPP_CONSTEXPR const bool is_integer = false;
- static _LIBCPP_CONSTEXPR const bool is_exact = false;
- static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __LDBL_EPSILON__; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5L; }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
- return __builtin_huge_vall();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {
- return __builtin_nanl("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {
- return __builtin_nansl("");
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {
- return __LDBL_DENORM_MIN__;
- }
+ static const bool is_specialized = true;
+
+ static const bool is_signed = true;
+ static const int digits = __LDBL_MANT_DIG__;
+ static const int digits10 = __LDBL_DIG__;
+ static const int max_digits10 = 2 + (digits * 30103l) / 100000l;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __LDBL_MIN__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __LDBL_MAX__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return -max(); }
+
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return __LDBL_EPSILON__; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return 0.5L; }
+
+ static const int min_exponent = __LDBL_MIN_EXP__;
+ static const int min_exponent10 = __LDBL_MIN_10_EXP__;
+ static const int max_exponent = __LDBL_MAX_EXP__;
+ static const int max_exponent10 = __LDBL_MAX_10_EXP__;
+
+ static const bool has_infinity = true;
+ static const bool has_quiet_NaN = true;
+ static const bool has_signaling_NaN = true;
+ static const float_denorm_style has_denorm = denorm_present;
+ static const bool has_denorm_loss = false;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return __builtin_huge_vall(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return __builtin_nanl(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return __builtin_nansl(""); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return __LDBL_DENORM_MIN__; }
#if defined(__powerpc__) && defined(__LONG_DOUBLE_IBM128__)
- static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
+ static const bool is_iec559 = false;
#else
- static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
+ static const bool is_iec559 = true;
#endif
- static _LIBCPP_CONSTEXPR const bool is_bounded = true;
- static _LIBCPP_CONSTEXPR const bool is_modulo = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
- static _LIBCPP_CONSTEXPR const bool traps = false;
+ static const bool traps = false;
#if (defined(__arm__) || defined(__aarch64__))
- static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+ static const bool tinyness_before = true;
#else
- static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+ static const bool tinyness_before = false;
#endif
- static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+ static const float_round_style round_style = round_to_nearest;
};
template <class _Tp>
@@ -464,105 +436,93 @@ class _LIBCPP_TEMPLATE_VIS numeric_limits : private __libcpp_numeric_limits<_Tp>
typedef typename __base::type type;
public:
- static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __base::min(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __base::max(); }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return __base::lowest(); }
-
- static _LIBCPP_CONSTEXPR const int digits = __base::digits;
- static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
- static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
- static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
- static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
- static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
- static _LIBCPP_CONSTEXPR const int radix = __base::radix;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {
- return __base::epsilon();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {
- return __base::round_error();
- }
-
- static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
- static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
- static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
- static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
-
- static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
+ static const bool is_specialized = __base::is_specialized;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type min() _NOEXCEPT { return __base::min(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type max() _NOEXCEPT { return __base::max(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type lowest() _NOEXCEPT { return __base::lowest(); }
+
+ static const int digits = __base::digits;
+ static const int digits10 = __base::digits10;
+ static const int max_digits10 = __base::max_digits10;
+ static const bool is_signed = __base::is_signed;
+ static const bool is_integer = __base::is_integer;
+ static const bool is_exact = __base::is_exact;
+ static const int radix = __base::radix;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type epsilon() _NOEXCEPT { return __base::epsilon(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type round_error() _NOEXCEPT { return __base::round_error(); }
+
+ static const int min_exponent = __base::min_exponent;
+ static const int min_exponent10 = __base::min_exponent10;
+ static const int max_exponent = __base::max_exponent;
+ static const int max_exponent10 = __base::max_exponent10;
+
+ static const bool has_infinity = __base::has_infinity;
+ static const bool has_quiet_NaN = __base::has_quiet_NaN;
+ static const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+ static const float_denorm_style has_denorm = __base::has_denorm;
+ static const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
- return __base::infinity();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {
- return __base::quiet_NaN();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {
- return __base::signaling_NaN();
- }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {
- return __base::denorm_min();
- }
-
- static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
- static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
- static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
-
- static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
- static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
- static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type infinity() _NOEXCEPT { return __base::infinity(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type quiet_NaN() _NOEXCEPT { return __base::quiet_NaN(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type signaling_NaN() _NOEXCEPT { return __base::signaling_NaN(); }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static type denorm_min() _NOEXCEPT { return __base::denorm_min(); }
+
+ static const bool is_iec559 = __base::is_iec559;
+ static const bool is_bounded = __base::is_bounded;
+ static const bool is_modulo = __base::is_modulo;
+
+ static const bool traps = __base::traps;
+ static const bool tinyness_before = __base::tinyness_before;
+ static const float_round_style round_style = __base::round_style;
};
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
+const bool numeric_limits<_Tp>::is_specialized;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
+const int numeric_limits<_Tp>::digits;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
+const int numeric_limits<_Tp>::digits10;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
+const int numeric_limits<_Tp>::max_digits10;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
+const bool numeric_limits<_Tp>::is_signed;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
+const bool numeric_limits<_Tp>::is_integer;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
+const bool numeric_limits<_Tp>::is_exact;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
+const int numeric_limits<_Tp>::radix;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
+const int numeric_limits<_Tp>::min_exponent;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
+const int numeric_limits<_Tp>::min_exponent10;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
+const int numeric_limits<_Tp>::max_exponent;
template <class _Tp>
-_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
+const int numeric_limits<_Tp>::max_exponent10;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
+const bool numeric_limits<_Tp>::has_infinity;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
+const bool numeric_limits<_Tp>::has_quiet_NaN;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
+const bool numeric_limits<_Tp>::has_signaling_NaN;
template <class _Tp>
-_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
+const float_denorm_style numeric_limits<_Tp>::has_denorm;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
+const bool numeric_limits<_Tp>::has_denorm_loss;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
+const bool numeric_limits<_Tp>::is_iec559;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
+const bool numeric_limits<_Tp>::is_bounded;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
+const bool numeric_limits<_Tp>::is_modulo;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
+const bool numeric_limits<_Tp>::traps;
template <class _Tp>
-_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
+const bool numeric_limits<_Tp>::tinyness_before;
template <class _Tp>
-_LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
+const float_round_style numeric_limits<_Tp>::round_style;
template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp> : public numeric_limits<_Tp> {};
diff --git a/libcxx/include/__cxx03/list b/libcxx/include/__cxx03/list
index 68d1e06b47527..f863885fbcf9e 100644
--- a/libcxx/include/__cxx03/list
+++ b/libcxx/include/__cxx03/list
@@ -487,7 +487,7 @@ protected:
}
_LIBCPP_HIDE_FROM_ABI static void __unlink_nodes(__link_pointer __f, __link_pointer __l) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI __list_imp() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value);
+ _LIBCPP_HIDE_FROM_ABI __list_imp();
_LIBCPP_HIDE_FROM_ABI __list_imp(const allocator_type& __a);
_LIBCPP_HIDE_FROM_ABI __list_imp(const __node_allocator& __a);
_LIBCPP_HIDE_FROM_ABI ~__list_imp();
@@ -499,17 +499,14 @@ protected:
_LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return iterator(__end_as_link()); }
_LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return const_iterator(__end_as_link()); }
- _LIBCPP_HIDE_FROM_ABI void swap(__list_imp& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>);
+ _LIBCPP_HIDE_FROM_ABI void swap(__list_imp& __c);
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __list_imp& __c) {
__copy_assign_alloc(
__c, integral_constant<bool, __node_alloc_traits::propagate_on_container_copy_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__list_imp& __c)
- _NOEXCEPT_(!__node_alloc_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__list_imp& __c) {
__move_assign_alloc(
__c, integral_constant<bool, __node_alloc_traits::propagate_on_container_move_assignment::value>());
}
@@ -550,8 +547,7 @@ private:
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __list_imp&, false_type) {}
- _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__list_imp& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__list_imp& __c, true_type) {
__node_alloc() = std::move(__c.__node_alloc());
}
@@ -566,8 +562,7 @@ inline void __list_imp<_Tp, _Alloc>::__unlink_nodes(__link_pointer __f, __link_p
}
template <class _Tp, class _Alloc>
-inline __list_imp<_Tp, _Alloc>::__list_imp() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
- : __size_alloc_(0, __default_init_tag()) {}
+inline __list_imp<_Tp, _Alloc>::__list_imp() : __size_alloc_(0, __default_init_tag()) {}
template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp(const allocator_type& __a) : __size_alloc_(0, __node_allocator(__a)) {}
@@ -596,9 +591,7 @@ void __list_imp<_Tp, _Alloc>::clear() _NOEXCEPT {
}
template <class _Tp, class _Alloc>
-void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
-{
+void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) {
_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
__alloc_traits::propagate_on_container_swap::value || this->__node_alloc() == __c.__node_alloc(),
"list::swap: Either propagate_on_container_swap must be true"
@@ -646,7 +639,7 @@ public:
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef void __remove_return_type;
- _LIBCPP_HIDE_FROM_ABI list() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value) {}
+ _LIBCPP_HIDE_FROM_ABI list() {}
_LIBCPP_HIDE_FROM_ABI explicit list(const allocator_type& __a) : base(__a) {}
_LIBCPP_HIDE_FROM_ABI explicit list(size_type __n);
_LIBCPP_HIDE_FROM_ABI list(size_type __n, const value_type& __x);
@@ -721,11 +714,7 @@ public:
template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InpIter __f, _InpIter __l);
- _LIBCPP_HIDE_FROM_ABI void swap(list& __c)
- _NOEXCEPT_(!__node_alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>)
- {
- base::swap(__c);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(list& __c) { base::swap(__c); }
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { base::clear(); }
_LIBCPP_HIDE_FROM_ABI void pop_front();
@@ -774,8 +763,7 @@ private:
template <class _Comp>
_LIBCPP_HIDDEN static iterator __sort(iterator __f1, iterator __e2, size_type __n, _Comp& __comp);
- _LIBCPP_HIDE_FROM_ABI void __move_assign(list& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(list& __c, true_type);
_LIBCPP_HIDE_FROM_ABI void __move_assign(list& __c, false_type);
};
@@ -1356,8 +1344,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const list<_Tp, _Alloc>& __x, const
}
template <class _Tp, class _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/locale b/libcxx/include/__cxx03/locale
index 405a482472901..64162f5a4ff2c 100644
--- a/libcxx/include/__cxx03/locale
+++ b/libcxx/include/__cxx03/locale
@@ -1328,7 +1328,7 @@ _LIBCPP_HIDE_FROM_ABI inline _OutputIterator num_put<_CharT, _OutputIterator>::_
// Worst case is octal, with showbase enabled. Note that octal is always
// printed as an unsigned value.
using _Unsigned = typename make_unsigned<_Integral>::type;
- _LIBCPP_CONSTEXPR const unsigned __nbuf =
+ const unsigned __nbuf =
(numeric_limits<_Unsigned>::digits / 3) // 1 char per 3 bits
+ ((numeric_limits<_Unsigned>::digits % 3) != 0) // round up
+ 2; // base prefix + terminating null character
@@ -3140,7 +3140,7 @@ template <class _Codecvt,
class _Elem = wchar_t,
class _WideAlloc = allocator<_Elem>,
class _ByteAlloc = allocator<char> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
+class _LIBCPP_TEMPLATE_VIS wstring_convert {
public:
typedef basic_string<char, char_traits<char>, _ByteAlloc> byte_string;
typedef basic_string<_Elem, char_traits<_Elem>, _WideAlloc> wide_string;
@@ -3155,11 +3155,10 @@ private:
size_t __cvtcount_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_EXPLICIT_SINCE_CXX14 wstring_convert(_Codecvt* __pcvt = new _Codecvt);
+ _LIBCPP_HIDE_FROM_ABI wstring_convert(_Codecvt* __pcvt = new _Codecvt);
_LIBCPP_HIDE_FROM_ABI wstring_convert(_Codecvt* __pcvt, state_type __state);
- _LIBCPP_EXPLICIT_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
- wstring_convert(const byte_string& __byte_err, const wide_string& __wide_err = wide_string());
+ _LIBCPP_HIDE_FROM_ABI wstring_convert(const byte_string& __byte_err, const wide_string& __wide_err = wide_string());
_LIBCPP_HIDE_FROM_ABI ~wstring_convert();
wstring_convert(const wstring_convert& __wc) = delete;
@@ -3329,7 +3328,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
}
template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert : public basic_streambuf<_Elem, _Tr> {
+class _LIBCPP_TEMPLATE_VIS wbuffer_convert : public basic_streambuf<_Elem, _Tr> {
public:
// types:
typedef _Elem char_type;
@@ -3356,7 +3355,7 @@ private:
bool __always_noconv_;
public:
- _LIBCPP_EXPLICIT_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
wbuffer_convert(streambuf* __bytebuf = nullptr, _Codecvt* __pcvt = new _Codecvt, state_type __state = state_type());
_LIBCPP_HIDE_FROM_ABI ~wbuffer_convert();
diff --git a/libcxx/include/__cxx03/map b/libcxx/include/__cxx03/map
index 6675b9fefb0bc..883e355fb20c4 100644
--- a/libcxx/include/__cxx03/map
+++ b/libcxx/include/__cxx03/map
@@ -611,10 +611,8 @@ template <class _Key,
bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
class __map_value_compare : private _Compare {
public:
- _LIBCPP_HIDE_FROM_ABI __map_value_compare() _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
- : _Compare() {}
- _LIBCPP_HIDE_FROM_ABI __map_value_compare(_Compare __c) _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
- : _Compare(__c) {}
+ _LIBCPP_HIDE_FROM_ABI __map_value_compare() : _Compare() {}
+ _LIBCPP_HIDE_FROM_ABI __map_value_compare(_Compare __c) : _Compare(__c) {}
_LIBCPP_HIDE_FROM_ABI const _Compare& key_comp() const _NOEXCEPT { return *this; }
_LIBCPP_HIDE_FROM_ABI bool operator()(const _CP& __x, const _CP& __y) const {
return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y.__get_value().first);
@@ -625,7 +623,7 @@ public:
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _CP& __y) const {
return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);
}
- _LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Compare>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare& __y) {
using std::swap;
swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
}
@@ -636,10 +634,8 @@ class __map_value_compare<_Key, _CP, _Compare, false> {
_Compare __comp_;
public:
- _LIBCPP_HIDE_FROM_ABI __map_value_compare() _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
- : __comp_() {}
- _LIBCPP_HIDE_FROM_ABI __map_value_compare(_Compare __c) _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
- : __comp_(__c) {}
+ _LIBCPP_HIDE_FROM_ABI __map_value_compare() : __comp_() {}
+ _LIBCPP_HIDE_FROM_ABI __map_value_compare(_Compare __c) : __comp_(__c) {}
_LIBCPP_HIDE_FROM_ABI const _Compare& key_comp() const _NOEXCEPT { return __comp_; }
_LIBCPP_HIDE_FROM_ABI bool operator()(const _CP& __x, const _CP& __y) const {
@@ -651,7 +647,7 @@ public:
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _CP& __y) const {
return __comp_(__x, __y.__get_value().first);
}
- void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Compare>) {
+ void swap(__map_value_compare& __y) {
using std::swap;
swap(__comp_, __y.__comp_);
}
@@ -659,8 +655,7 @@ public:
template <class _Key, class _CP, class _Compare, bool __b>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x, __map_value_compare<_Key, _CP, _Compare, __b>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x, __map_value_compare<_Key, _CP, _Compare, __b>& __y) {
__x.swap(__y);
}
@@ -901,14 +896,9 @@ public:
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS multimap;
- _LIBCPP_HIDE_FROM_ABI map() _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
- is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__vc(key_compare())) {}
+ _LIBCPP_HIDE_FROM_ABI map() : __tree_(__vc(key_compare())) {}
- _LIBCPP_HIDE_FROM_ABI explicit map(const key_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__vc(__comp)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit map(const key_compare& __comp) : __tree_(__vc(__comp)) {}
_LIBCPP_HIDE_FROM_ABI explicit map(const key_compare& __comp, const allocator_type& __a)
: __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}
@@ -995,7 +985,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __tree_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(map& __m) _NOEXCEPT_(__is_nothrow_swappable_v<__base>) { __tree_.swap(__m.__tree_); }
+ _LIBCPP_HIDE_FROM_ABI void swap(map& __m) { __tree_.swap(__m.__tree_); }
_LIBCPP_HIDE_FROM_ABI iterator find(const key_type& __k) { return __tree_.find(__k); }
_LIBCPP_HIDE_FROM_ABI const_iterator find(const key_type& __k) const { return __tree_.find(__k); }
@@ -1109,8 +1099,7 @@ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp,
template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(map<_Key, _Tp, _Compare, _Allocator>& __x, map<_Key, _Tp, _Compare, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(map<_Key, _Tp, _Compare, _Allocator>& __x, map<_Key, _Tp, _Compare, _Allocator>& __y) {
__x.swap(__y);
}
@@ -1169,14 +1158,9 @@ public:
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS multimap;
- _LIBCPP_HIDE_FROM_ABI multimap() _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
- is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__vc(key_compare())) {}
+ _LIBCPP_HIDE_FROM_ABI multimap() : __tree_(__vc(key_compare())) {}
- _LIBCPP_HIDE_FROM_ABI explicit multimap(const key_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__vc(__comp)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit multimap(const key_compare& __comp) : __tree_(__vc(__comp)) {}
_LIBCPP_HIDE_FROM_ABI explicit multimap(const key_compare& __comp, const allocator_type& __a)
: __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}
@@ -1263,9 +1247,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __tree_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(multimap& __m) _NOEXCEPT_(__is_nothrow_swappable_v<__base>) {
- __tree_.swap(__m.__tree_);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(multimap& __m) { __tree_.swap(__m.__tree_); }
_LIBCPP_HIDE_FROM_ABI iterator find(const key_type& __k) { return __tree_.find(__k); }
_LIBCPP_HIDE_FROM_ABI const_iterator find(const key_type& __k) const { return __tree_.find(__k); }
@@ -1332,8 +1314,7 @@ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x, const multimap<
template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x, multimap<_Key, _Tp, _Compare, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x, multimap<_Key, _Tp, _Compare, _Allocator>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/new b/libcxx/include/__cxx03/new
index c9994c876c200..b9d56e165bdf4 100644
--- a/libcxx/include/__cxx03/new
+++ b/libcxx/include/__cxx03/new
@@ -233,7 +233,7 @@ inline _LIBCPP_HIDE_FROM_ABI void operator delete[](void*, void*) _NOEXCEPT {}
_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI bool __is_overaligned_for_new(size_t __align) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool __is_overaligned_for_new(size_t __align) _NOEXCEPT {
#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
return __align > __STDCPP_DEFAULT_NEW_ALIGNMENT__;
#else
@@ -310,7 +310,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __libcpp_deallocate_unsized(void* __ptr, size_
}
template <class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _Tp* __launder(_Tp* __p) _NOEXCEPT {
static_assert(!(is_function<_Tp>::value), "can't launder functions");
static_assert(!(is_same<void, __remove_cv_t<_Tp> >::value), "can't launder cv-void");
return __builtin_launder(__p);
diff --git a/libcxx/include/__cxx03/queue b/libcxx/include/__cxx03/queue
index 4bff23f5e45f5..c20ac525741ff 100644
--- a/libcxx/include/__cxx03/queue
+++ b/libcxx/include/__cxx03/queue
@@ -298,7 +298,7 @@ protected:
container_type c;
public:
- _LIBCPP_HIDE_FROM_ABI queue() _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value) : c() {}
+ _LIBCPP_HIDE_FROM_ABI queue() : c() {}
_LIBCPP_HIDE_FROM_ABI queue(const queue& __q) : c(__q.c) {}
@@ -329,7 +329,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void push(const value_type& __v) { c.push_back(__v); }
_LIBCPP_HIDE_FROM_ABI void pop() { c.pop_front(); }
- _LIBCPP_HIDE_FROM_ABI void swap(queue& __q) _NOEXCEPT_(__is_nothrow_swappable_v<container_type>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(queue& __q) {
using std::swap;
swap(c, __q.c);
}
@@ -376,8 +376,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const queue<_Tp, _Container>& __x,
}
template <class _Tp, class _Container, __enable_if_t<__is_swappable_v<_Container>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI void swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y) {
__x.swap(__y);
}
@@ -401,9 +400,7 @@ protected:
value_compare comp;
public:
- _LIBCPP_HIDE_FROM_ABI priority_queue() _NOEXCEPT_(
- is_nothrow_default_constructible<container_type>::value&& is_nothrow_default_constructible<value_compare>::value)
- : c(), comp() {}
+ _LIBCPP_HIDE_FROM_ABI priority_queue() : c(), comp() {}
_LIBCPP_HIDE_FROM_ABI priority_queue(const priority_queue& __q) : c(__q.c), comp(__q.comp) {}
@@ -463,8 +460,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void push(const value_type& __v);
_LIBCPP_HIDE_FROM_ABI void pop();
- _LIBCPP_HIDE_FROM_ABI void swap(priority_queue& __q)
- _NOEXCEPT_(__is_nothrow_swappable_v<container_type>&& __is_nothrow_swappable_v<value_compare>);
+ _LIBCPP_HIDE_FROM_ABI void swap(priority_queue& __q);
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; }
};
@@ -560,8 +556,7 @@ inline void priority_queue<_Tp, _Container, _Compare>::pop() {
}
template <class _Tp, class _Container, class _Compare>
-inline void priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
- _NOEXCEPT_(__is_nothrow_swappable_v<container_type>&& __is_nothrow_swappable_v<value_compare>) {
+inline void priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q) {
using std::swap;
swap(c, __q.c);
swap(comp, __q.comp);
@@ -572,8 +567,7 @@ template <class _Tp,
class _Compare,
__enable_if_t<__is_swappable_v<_Container> && __is_swappable_v<_Compare>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Container, _Compare>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Container, _Compare>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/ratio b/libcxx/include/__cxx03/ratio
index 1280a272d6db7..6012efd49fcb3 100644
--- a/libcxx/include/__cxx03/ratio
+++ b/libcxx/include/__cxx03/ratio
@@ -242,23 +242,23 @@ class _LIBCPP_TEMPLATE_VIS ratio {
static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
static_assert(_Den != 0, "ratio divide by 0");
static_assert(__static_abs<_Den>::value > 0, "ratio denominator is out of range");
- static _LIBCPP_CONSTEXPR const intmax_t __na = __static_abs<_Num>::value;
- static _LIBCPP_CONSTEXPR const intmax_t __da = __static_abs<_Den>::value;
- static _LIBCPP_CONSTEXPR const intmax_t __s = __static_sign<_Num>::value * __static_sign<_Den>::value;
- static _LIBCPP_CONSTEXPR const intmax_t __gcd = __static_gcd<__na, __da>::value;
+ static const intmax_t __na = __static_abs<_Num>::value;
+ static const intmax_t __da = __static_abs<_Den>::value;
+ static const intmax_t __s = __static_sign<_Num>::value * __static_sign<_Den>::value;
+ static const intmax_t __gcd = __static_gcd<__na, __da>::value;
public:
- static _LIBCPP_CONSTEXPR const intmax_t num = __s * __na / __gcd;
- static _LIBCPP_CONSTEXPR const intmax_t den = __da / __gcd;
+ static const intmax_t num = __s * __na / __gcd;
+ static const intmax_t den = __da / __gcd;
typedef ratio<num, den> type;
};
template <intmax_t _Num, intmax_t _Den>
-_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
+const intmax_t ratio<_Num, _Den>::num;
template <intmax_t _Num, intmax_t _Den>
-_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
+const intmax_t ratio<_Num, _Den>::den;
template <class _Tp>
struct __is_ratio : false_type {};
diff --git a/libcxx/include/__cxx03/regex b/libcxx/include/__cxx03/regex
index 4e4cbd20e609f..df627f955e885 100644
--- a/libcxx/include/__cxx03/regex
+++ b/libcxx/include/__cxx03/regex
@@ -847,7 +847,7 @@ enum syntax_option_type {
multiline = 1 << 10
};
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR syntax_option_type __get_grammar(syntax_option_type __g) {
+_LIBCPP_HIDE_FROM_ABI inline syntax_option_type __get_grammar(syntax_option_type __g) {
#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
return static_cast<syntax_option_type>(__g & 0x3F0);
#else
@@ -855,21 +855,21 @@ _LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR syntax_option_type __get_grammar(
#endif
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR syntax_option_type operator~(syntax_option_type __x) {
+inline _LIBCPP_HIDE_FROM_ABI syntax_option_type operator~(syntax_option_type __x) {
return syntax_option_type(~int(__x) & 0x1FF);
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR syntax_option_type
+inline _LIBCPP_HIDE_FROM_ABI syntax_option_type
operator&(syntax_option_type __x, syntax_option_type __y) {
return syntax_option_type(int(__x) & int(__y));
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR syntax_option_type
+inline _LIBCPP_HIDE_FROM_ABI syntax_option_type
operator|(syntax_option_type __x, syntax_option_type __y) {
return syntax_option_type(int(__x) | int(__y));
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR syntax_option_type
+inline _LIBCPP_HIDE_FROM_ABI syntax_option_type
operator^(syntax_option_type __x, syntax_option_type __y) {
return syntax_option_type(int(__x) ^ int(__y));
}
@@ -909,19 +909,19 @@ enum match_flag_type {
__full_match = 1 << 12
};
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR match_flag_type operator~(match_flag_type __x) {
+inline _LIBCPP_HIDE_FROM_ABI match_flag_type operator~(match_flag_type __x) {
return match_flag_type(~int(__x) & 0x0FFF);
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR match_flag_type operator&(match_flag_type __x, match_flag_type __y) {
+inline _LIBCPP_HIDE_FROM_ABI match_flag_type operator&(match_flag_type __x, match_flag_type __y) {
return match_flag_type(int(__x) & int(__y));
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR match_flag_type operator|(match_flag_type __x, match_flag_type __y) {
+inline _LIBCPP_HIDE_FROM_ABI match_flag_type operator|(match_flag_type __x, match_flag_type __y) {
return match_flag_type(int(__x) | int(__y));
}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR match_flag_type operator^(match_flag_type __x, match_flag_type __y) {
+inline _LIBCPP_HIDE_FROM_ABI match_flag_type operator^(match_flag_type __x, match_flag_type __y) {
return match_flag_type(int(__x) ^ int(__y));
}
@@ -1822,7 +1822,7 @@ void __word_boundary<_CharT, _Traits>::__exec(__state& __s) const {
// __l_anchor
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __is_eol(_CharT __c) {
+_LIBCPP_HIDE_FROM_ABI bool __is_eol(_CharT __c) {
return __c == '\r' || __c == '\n';
}
@@ -4162,7 +4162,7 @@ public:
bool matched;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR sub_match() : matched() {}
+ _LIBCPP_HIDE_FROM_ABI sub_match() : matched() {}
_LIBCPP_HIDE_FROM_ABI difference_type length() const {
return matched ? std::distance(this->first, this->second) : 0;
@@ -4176,7 +4176,7 @@ public:
_LIBCPP_HIDE_FROM_ABI int compare(const string_type& __s) const { return str().compare(__s); }
_LIBCPP_HIDE_FROM_ABI int compare(const value_type* __s) const { return str().compare(__s); }
- _LIBCPP_HIDE_FROM_ABI void swap(sub_match& __s) _NOEXCEPT_(__is_nothrow_swappable_v<_BidirectionalIterator>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(sub_match& __s) {
this->pair<_BidirectionalIterator, _BidirectionalIterator>::swap(__s);
std::swap(matched, __s.matched);
}
diff --git a/libcxx/include/__cxx03/set b/libcxx/include/__cxx03/set
index eeb2cb4cb202c..e10bc5a43cfa5 100644
--- a/libcxx/include/__cxx03/set
+++ b/libcxx/include/__cxx03/set
@@ -582,14 +582,9 @@ public:
template <class _Key2, class _Compare2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS multiset;
- _LIBCPP_HIDE_FROM_ABI set() _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
- is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(value_compare()) {}
+ _LIBCPP_HIDE_FROM_ABI set() : __tree_(value_compare()) {}
- _LIBCPP_HIDE_FROM_ABI explicit set(const value_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__comp) {}
+ _LIBCPP_HIDE_FROM_ABI explicit set(const value_compare& __comp) : __tree_(__comp) {}
_LIBCPP_HIDE_FROM_ABI explicit set(const value_compare& __comp, const allocator_type& __a) : __tree_(__comp, __a) {}
template <class _InputIterator>
@@ -656,7 +651,7 @@ public:
_LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __f, const_iterator __l) { return __tree_.erase(__f, __l); }
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __tree_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(set& __s) _NOEXCEPT_(__is_nothrow_swappable_v<__base>) { __tree_.swap(__s.__tree_); }
+ _LIBCPP_HIDE_FROM_ABI void swap(set& __s) { __tree_.swap(__s.__tree_); }
_LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT { return __tree_.__alloc(); }
_LIBCPP_HIDE_FROM_ABI key_compare key_comp() const { return __tree_.value_comp(); }
@@ -720,8 +715,7 @@ operator<=(const set<_Key, _Compare, _Allocator>& __x, const set<_Key, _Compare,
// specialized algorithms:
template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI void swap(set<_Key, _Compare, _Allocator>& __x, set<_Key, _Compare, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(set<_Key, _Compare, _Allocator>& __x, set<_Key, _Compare, _Allocator>& __y) {
__x.swap(__y);
}
@@ -764,14 +758,9 @@ public:
friend class _LIBCPP_TEMPLATE_VIS multiset;
// construct/copy/destroy:
- _LIBCPP_HIDE_FROM_ABI multiset() _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
- is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(value_compare()) {}
+ _LIBCPP_HIDE_FROM_ABI multiset() : __tree_(value_compare()) {}
- _LIBCPP_HIDE_FROM_ABI explicit multiset(const value_compare& __comp) _NOEXCEPT_(
- is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_copy_constructible<key_compare>::value)
- : __tree_(__comp) {}
+ _LIBCPP_HIDE_FROM_ABI explicit multiset(const value_compare& __comp) : __tree_(__comp) {}
_LIBCPP_HIDE_FROM_ABI explicit multiset(const value_compare& __comp, const allocator_type& __a)
: __tree_(__comp, __a) {}
@@ -843,9 +832,7 @@ public:
_LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __f, const_iterator __l) { return __tree_.erase(__f, __l); }
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __tree_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(multiset& __s) _NOEXCEPT_(__is_nothrow_swappable_v<__base>) {
- __tree_.swap(__s.__tree_);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(multiset& __s) { __tree_.swap(__s.__tree_); }
_LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT { return __tree_.__alloc(); }
_LIBCPP_HIDE_FROM_ABI key_compare key_comp() const { return __tree_.value_comp(); }
@@ -909,8 +896,7 @@ operator<=(const multiset<_Key, _Compare, _Allocator>& __x, const multiset<_Key,
template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(multiset<_Key, _Compare, _Allocator>& __x, multiset<_Key, _Compare, _Allocator>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(multiset<_Key, _Compare, _Allocator>& __x, multiset<_Key, _Compare, _Allocator>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/stack b/libcxx/include/__cxx03/stack
index f216f842376ed..3c76006fd61c1 100644
--- a/libcxx/include/__cxx03/stack
+++ b/libcxx/include/__cxx03/stack
@@ -152,7 +152,7 @@ protected:
container_type c;
public:
- _LIBCPP_HIDE_FROM_ABI stack() _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value) : c() {}
+ _LIBCPP_HIDE_FROM_ABI stack() : c() {}
_LIBCPP_HIDE_FROM_ABI stack(const stack& __q) : c(__q.c) {}
@@ -185,7 +185,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void pop() { c.pop_back(); }
- _LIBCPP_HIDE_FROM_ABI void swap(stack& __s) _NOEXCEPT_(__is_nothrow_swappable_v<container_type>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(stack& __s) {
using std::swap;
swap(c, __s.c);
}
@@ -230,8 +230,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const stack<_Tp, _Container>& __x,
}
template <class _Tp, class _Container, __enable_if_t<__is_swappable_v<_Container>, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI void swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/string b/libcxx/include/__cxx03/string
index 209ccc98cb6d8..7d54030d0b660 100644
--- a/libcxx/include/__cxx03/string
+++ b/libcxx/include/__cxx03/string
@@ -672,23 +672,23 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// basic_string
template <class _CharT, class _Traits, class _Allocator>
-basic_string<_CharT, _Traits, _Allocator> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+basic_string<_CharT, _Traits, _Allocator> _LIBCPP_HIDE_FROM_ABI
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const basic_string<_CharT, _Traits, _Allocator>& __y);
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDDEN basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __x, const basic_string<_CharT, _Traits, _Allocator>& __y);
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __x, const basic_string<_CharT, _Traits, _Allocator>& __y);
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+inline _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
extern template _LIBCPP_EXPORTED_FROM_ABI string operator+
@@ -754,7 +754,7 @@ public:
void>;
#endif
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __asan_volatile_wrapper(pointer const& __ptr) const {
+ _LIBCPP_HIDE_FROM_ABI pointer __asan_volatile_wrapper(pointer const& __ptr) const {
if (__libcpp_is_constant_evaluated())
return __ptr;
@@ -763,8 +763,7 @@ public:
return const_cast<pointer&>(__copy_ptr);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_pointer
- __asan_volatile_wrapper(const_pointer const& __ptr) const {
+ _LIBCPP_HIDE_FROM_ABI const_pointer __asan_volatile_wrapper(const_pointer const& __ptr) const {
if (__libcpp_is_constant_evaluated())
return __ptr;
@@ -885,8 +884,7 @@ private:
// Construct a string with the given allocator and enough storage to hold `__size` characters, but
// don't initialize the characters. The contents of the string, including the null terminator, must be
// initialized separately.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(
- __uninitialized_size_tag, size_type __size, const allocator_type& __a)
+ _LIBCPP_HIDE_FROM_ABI explicit basic_string(__uninitialized_size_tag, size_type __size, const allocator_type& __a)
: __r_(__default_init_tag(), __a) {
if (__size > max_size())
__throw_length_error();
@@ -905,13 +903,12 @@ private:
}
template <class _Iter, class _Sent>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- basic_string(__init_with_sentinel_tag, _Iter __first, _Sent __last, const allocator_type& __a)
+ _LIBCPP_HIDE_FROM_ABI basic_string(__init_with_sentinel_tag, _Iter __first, _Sent __last, const allocator_type& __a)
: __r_(__default_init_tag(), __a) {
__init_with_sentinel(std::move(__first), std::move(__last));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator __make_iterator(pointer __p) {
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iterator(pointer __p) {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING
// Bound the iterator according to the size (and not the capacity, unlike vector).
//
@@ -928,7 +925,7 @@ private:
#endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator __make_const_iterator(const_pointer __p) const {
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_const_iterator(const_pointer __p) const {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING
// Bound the iterator according to the size (and not the capacity, unlike vector).
return std::__make_bounded_iter(
@@ -943,19 +940,13 @@ private:
public:
_LIBCPP_TEMPLATE_DATA_VIS static const size_type npos = -1;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __r_(__value_init_tag(), __default_init_tag()) {
- __annotate_new(0);
- }
+ _LIBCPP_HIDE_FROM_ABI basic_string() : __r_(__value_init_tag(), __default_init_tag()) { __annotate_new(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const allocator_type& __a)
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
- : __r_(__value_init_tag(), __a) {
+ _LIBCPP_HIDE_FROM_ABI explicit basic_string(const allocator_type& __a) : __r_(__value_init_tag(), __a) {
__annotate_new(0);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string(const basic_string& __str)
+ _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string(const basic_string& __str)
: __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc())) {
if (!__str.__is_long()) {
__r_.first() = __str.__r_.first();
@@ -964,9 +955,8 @@ public:
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
- basic_string(const basic_string& __str, const allocator_type& __a)
- : __r_(__default_init_tag(), __a) {
+ _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
+ basic_string(const basic_string& __str, const allocator_type& __a) : __r_(__default_init_tag(), __a) {
if (!__str.__is_long()) {
__r_.first() = __str.__r_.first();
__annotate_new(__get_short_size());
@@ -975,44 +965,39 @@ public:
}
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s)
- : __r_(__default_init_tag(), __default_init_tag()) {
+ _LIBCPP_HIDE_FROM_ABI basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "basic_string(const char*) detected nullptr");
__init(__s, traits_type::length(__s));
}
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, const _Allocator& __a)
- : __r_(__default_init_tag(), __a) {
+ _LIBCPP_HIDE_FROM_ABI basic_string(const _CharT* __s, const _Allocator& __a) : __r_(__default_init_tag(), __a) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "basic_string(const char*, allocator) detected nullptr");
__init(__s, traits_type::length(__s));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n)
+ _LIBCPP_HIDE_FROM_ABI basic_string(const _CharT* __s, size_type __n)
: __r_(__default_init_tag(), __default_init_tag()) {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
__init(__s, __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
+ _LIBCPP_HIDE_FROM_ABI basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
: __r_(__default_init_tag(), __a) {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
__init(__s, __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c)
- : __r_(__default_init_tag(), __default_init_tag()) {
+ _LIBCPP_HIDE_FROM_ABI basic_string(size_type __n, _CharT __c) : __r_(__default_init_tag(), __default_init_tag()) {
__init(__n, __c);
}
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c, const _Allocator& __a)
+ _LIBCPP_HIDE_FROM_ABI basic_string(size_type __n, _CharT __c, const _Allocator& __a)
: __r_(__default_init_tag(), __a) {
__init(__n, __c);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _Allocator())
: __r_(__default_init_tag(), __a) {
size_type __str_sz = __str.size();
@@ -1021,8 +1006,7 @@ public:
__init(__str.data() + __pos, std::min(__n, __str_sz - __pos));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
+ _LIBCPP_HIDE_FROM_ABI basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
: __r_(__default_init_tag(), __a) {
size_type __str_sz = __str.size();
if (__pos > __str_sz)
@@ -1034,7 +1018,7 @@ public:
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type())
: __r_(__default_init_tag(), __a) {
__self_view __sv0 = __t;
@@ -1046,7 +1030,7 @@ public:
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t)
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit basic_string(const _Tp& __t)
: __r_(__default_init_tag(), __default_init_tag()) {
__self_view __sv = __t;
__init(__sv.data(), __sv.size());
@@ -1056,92 +1040,67 @@ public:
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t, const allocator_type& __a)
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit basic_string(const _Tp& __t, const allocator_type& __a)
: __r_(__default_init_tag(), __a) {
__self_view __sv = __t;
__init(__sv.data(), __sv.size());
}
template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(_InputIterator __first, _InputIterator __last)
+ _LIBCPP_HIDE_FROM_ABI basic_string(_InputIterator __first, _InputIterator __last)
: __r_(__default_init_tag(), __default_init_tag()) {
__init(__first, __last);
}
template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
+ _LIBCPP_HIDE_FROM_ABI basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
: __r_(__default_init_tag(), __a) {
__init(__first, __last);
}
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() {
+ inline ~basic_string() {
__annotate_delete();
if (__is_long())
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator __self_view() const _NOEXCEPT {
- return __self_view(data(), size());
- }
+ _LIBCPP_HIDE_FROM_ABI operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string&
- operator=(const basic_string& __str);
+ _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string& operator=(const basic_string& __str);
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const _Tp& __t) {
+ basic_string& operator=(const _Tp& __t) {
__self_view __sv = __t;
return assign(__sv);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const value_type* __s) {
- return assign(__s);
- }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(value_type __c);
+ _LIBCPP_HIDE_FROM_ABI basic_string& operator=(const value_type* __s) { return assign(__s); }
+ basic_string& operator=(value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin() _NOEXCEPT {
- return __make_iterator(__get_pointer());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator begin() const _NOEXCEPT {
- return __make_const_iterator(__get_pointer());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end() _NOEXCEPT {
- return __make_iterator(__get_pointer() + size());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator end() const _NOEXCEPT {
- return __make_const_iterator(__get_pointer() + size());
- }
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __make_iterator(__get_pointer()); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __make_const_iterator(__get_pointer()); }
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __make_iterator(__get_pointer() + size()); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return __make_const_iterator(__get_pointer() + size()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reverse_iterator rbegin() _NOEXCEPT {
- return reverse_iterator(end());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator rbegin() const _NOEXCEPT {
- return const_reverse_iterator(end());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reverse_iterator rend() _NOEXCEPT {
- return reverse_iterator(begin());
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator rend() const _NOEXCEPT {
- return const_reverse_iterator(begin());
- }
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT { return reverse_iterator(end()); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(end()); }
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT { return reverse_iterator(begin()); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT { return const_reverse_iterator(begin()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator cbegin() const _NOEXCEPT { return begin(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator cend() const _NOEXCEPT { return end(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator crbegin() const _NOEXCEPT {
- return rbegin();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return begin(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return end(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT { return rbegin(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type size() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT {
return __is_long() ? __get_long_size() : __get_short_size();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type length() const _NOEXCEPT { return size(); }
+ _LIBCPP_HIDE_FROM_ABI size_type length() const _NOEXCEPT { return size(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
size_type __m = __alloc_traits::max_size(__alloc());
if (__m <= std::numeric_limits<size_type>::max() / 2) {
return __m - __alignment;
@@ -1151,26 +1110,24 @@ public:
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type capacity() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type capacity() const _NOEXCEPT {
return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n) { resize(__n, value_type()); }
+ void resize(size_type __n, value_type __c);
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __n) { resize(__n, value_type()); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __requested_capacity);
+ void reserve(size_type __requested_capacity);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __resize_default_init(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __resize_default_init(size_type __n);
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void clear() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
+ _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool empty() const _NOEXCEPT {
- return size() == 0;
- }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return size() == 0; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos <= size(), "string index out of bounds");
if (__builtin_constant_p(__pos) && !__fits_in_sso(__pos)) {
return *(__get_long_pointer() + __pos);
@@ -1178,7 +1135,7 @@ public:
return *(data() + __pos);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](size_type __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __pos) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos <= size(), "string index out of bounds");
if (__builtin_constant_p(__pos) && !__fits_in_sso(__pos)) {
return *(__get_long_pointer() + __pos);
@@ -1186,65 +1143,55 @@ public:
return *(__get_pointer() + __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference at(size_type __n) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 reference at(size_type __n);
+ const_reference at(size_type __n) const;
+ reference at(size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const basic_string& __str) {
- return append(__str);
- }
+ _LIBCPP_HIDE_FROM_ABI basic_string& operator+=(const basic_string& __str) { return append(__str); }
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string >::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- operator+=(const _Tp& __t) {
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string& operator+=(const _Tp& __t) {
__self_view __sv = __t;
return append(__sv);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const value_type* __s) {
- return append(__s);
- }
+ _LIBCPP_HIDE_FROM_ABI basic_string& operator+=(const value_type* __s) { return append(__s); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(value_type __c) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& operator+=(value_type __c) {
push_back(__c);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
- return append(__str.data(), __str.size());
- }
+ _LIBCPP_HIDE_FROM_ABI basic_string& append(const basic_string& __str) { return append(__str.data(), __str.size()); }
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- append(const _Tp& __t) {
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string& append(const _Tp& __t) {
__self_view __sv = __t;
return append(__sv.data(), __sv.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos);
+ basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos);
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
-
- basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
append(const _Tp& __t, size_type __pos, size_type __n = npos);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(size_type __n, value_type __c);
+ basic_string& append(const value_type* __s, size_type __n);
+ basic_string& append(const value_type* __s);
+ basic_string& append(size_type __n, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __append_default_init(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __append_default_init(size_type __n);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI basic_string&
append(_InputIterator __first, _InputIterator __last) {
const basic_string __temp(__first, __last, __alloc());
append(__temp.data(), __temp.size());
@@ -1252,71 +1199,66 @@ public:
}
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI basic_string&
append(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back();
+ void push_back(value_type __c);
+ _LIBCPP_HIDE_FROM_ABI void pop_back();
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference front() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::front(): string is empty");
return *__get_pointer();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::front(): string is empty");
return *data();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference back() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::back(): string is empty");
return *(__get_pointer() + size() - 1);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::back(): string is empty");
return *(data() + size() - 1);
}
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- assign(const _Tp& __t) {
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string& assign(const _Tp& __t) {
__self_view __sv = __t;
return assign(__sv.data(), __sv.size());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str) {
- return *this = __str;
- }
+ _LIBCPP_HIDE_FROM_ABI basic_string& assign(const basic_string& __str) { return *this = __str; }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos);
+ basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos);
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
assign(const _Tp& __t, size_type __pos, size_type __n = npos);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(size_type __n, value_type __c);
+ basic_string& assign(const value_type* __s, size_type __n);
+ basic_string& assign(const value_type* __s);
+ basic_string& assign(size_type __n, value_type __c);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
assign(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
assign(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- insert(size_type __pos1, const basic_string& __str) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& insert(size_type __pos1, const basic_string& __str) {
return insert(__pos1, __str.data(), __str.size());
}
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- insert(size_type __pos1, const _Tp& __t) {
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string& insert(size_type __pos1, const _Tp& __t) {
__self_view __sv = __t;
return insert(__pos1, __sv.data(), __sv.size());
}
@@ -1325,257 +1267,219 @@ public:
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n = npos);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, size_type __n, value_type __c);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __pos, value_type __c);
+ basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos);
+ basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
+ basic_string& insert(size_type __pos, const value_type* __s);
+ basic_string& insert(size_type __pos, size_type __n, value_type __c);
+ iterator insert(const_iterator __pos, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
- insert(const_iterator __pos, size_type __n, value_type __c) {
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __pos, size_type __n, value_type __c) {
difference_type __p = __pos - begin();
insert(static_cast<size_type>(__p), __n, __c);
return begin() + __p;
}
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS iterator
insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS iterator
insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& erase(size_type __pos = 0, size_type __n = npos);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __pos);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __first, const_iterator __last);
+ basic_string& erase(size_type __pos = 0, size_type __n = npos);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __pos);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- replace(size_type __pos1, size_type __n1, const basic_string& __str) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str) {
return replace(__pos1, __n1, __str.data(), __str.size());
}
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
replace(size_type __pos1, size_type __n1, const _Tp& __t) {
__self_view __sv = __t;
return replace(__pos1, __n1, __sv.data(), __sv.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos);
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
replace(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
+ basic_string& replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
+ basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
+ basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
return replace(
static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __str.data(), __str.size());
}
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
replace(const_iterator __i1, const_iterator __i2, const _Tp& __t) {
__self_view __sv = __t;
return replace(__i1 - begin(), __i2 - __i1, __sv);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_HIDE_FROM_ABI basic_string&
replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n) {
return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- replace(const_iterator __i1, const_iterator __i2, const value_type* __s) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s) {
return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c) {
return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, __c);
}
template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS basic_string&
replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
+ size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string
- substr(size_type __pos = 0, size_type __n = npos) const {
+ _LIBCPP_HIDE_FROM_ABI basic_string substr(size_type __pos = 0, size_type __n = npos) const {
return basic_string(*this, __pos, __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(basic_string& __str)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>);
+ _LIBCPP_HIDE_FROM_ABI void swap(basic_string& __str);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const value_type* c_str() const _NOEXCEPT { return data(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const value_type* data() const _NOEXCEPT {
- return std::__to_address(__get_pointer());
- }
+ _LIBCPP_HIDE_FROM_ABI const value_type* c_str() const _NOEXCEPT { return data(); }
+ _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT { return std::__to_address(__get_pointer()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator_type get_allocator() const _NOEXCEPT {
- return __alloc();
- }
+ _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT { return __alloc(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
find(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
+ size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
+ size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
rfind(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
+ size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
+ size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
find_first_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
+ size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
find_last_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
+ size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
find_first_not_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_first_not_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
+ size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS size_type
find_last_not_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- find_last_not_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
+ size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const basic_string& __str) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI int compare(const basic_string& __str) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 int
- compare(const _Tp& __t) const _NOEXCEPT;
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS int compare(const _Tp& __t) const _NOEXCEPT;
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 int
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS int
compare(size_type __pos1, size_type __n1, const _Tp& __t) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int
- compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 int
- compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const;
+ _LIBCPP_HIDE_FROM_ABI int compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
+ int compare(
+ size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const;
template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value,
int> = 0>
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int
+ inline _LIBCPP_HIDE_FROM_ABI int
compare(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const value_type* __s) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 int
- compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;
+ int compare(const value_type* __s) const _NOEXCEPT;
+ int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
+ int compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __clear_and_shrink() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void __clear_and_shrink() _NOEXCEPT;
private:
template <class _Alloc>
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool friend
+ inline _LIBCPP_HIDE_FROM_ABI bool friend
operator==(const basic_string<char, char_traits<char>, _Alloc>& __lhs,
const basic_string<char, char_traits<char>, _Alloc>& __rhs) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __shrink_or_extend(size_type __target_capacity);
+ _LIBCPP_HIDE_FROM_ABI void __shrink_or_extend(size_type __target_capacity);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS bool
- __is_long() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS bool __is_long() const _NOEXCEPT {
if (__libcpp_is_constant_evaluated() && __builtin_constant_p(__r_.first().__l.__is_long_)) {
return __r_.first().__l.__is_long_;
}
return __r_.first().__s.__is_long_;
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __begin_lifetime(pointer __begin, size_type __n) {
+ static _LIBCPP_HIDE_FROM_ABI void __begin_lifetime(pointer __begin, size_type __n) {
(void)__begin;
(void)__n;
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI static bool __fits_in_sso(size_type __sz) { return __sz < __min_cap; }
+ _LIBCPP_HIDE_FROM_ABI static bool __fits_in_sso(size_type __sz) { return __sz < __min_cap; }
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
- __assign_trivial(_Iterator __first, _Sentinel __last, size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __assign_trivial(_Iterator __first, _Sentinel __last, size_type __n);
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
+ _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
// Copy [__first, __last) into [__dest, __dest + (__last - __first)). Assumes that the ranges don't overlap.
template <class _ForwardIter, class _Sent>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static value_type*
+ _LIBCPP_HIDE_FROM_ABI static value_type*
__copy_non_overlapping_range(_ForwardIter __first, _Sent __last, value_type* __dest) {
for (; __first != __last; ++__first)
traits_type::assign(*__dest++, *__first);
@@ -1583,7 +1487,7 @@ private:
}
template <class _ForwardIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
__insert_from_safe_copy(size_type __n, size_type __ip, _ForwardIterator __first, _Sentinel __last) {
size_type __sz = size();
size_type __cap = capacity();
@@ -1607,74 +1511,60 @@ private:
}
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
- __insert_with_size(const_iterator __pos, _Iterator __first, _Sentinel __last, size_type __n);
+ iterator __insert_with_size(const_iterator __pos, _Iterator __first, _Sentinel __last, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
+ _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
+ _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS void
- __set_short_size(size_type __s) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS void __set_short_size(size_type __s) _NOEXCEPT {
_LIBCPP_ASSERT_INTERNAL(__s < __min_cap, "__s should never be greater than or equal to the short string capacity");
__r_.first().__s.__size_ = __s;
__r_.first().__s.__is_long_ = false;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS size_type
- __get_short_size() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS size_type __get_short_size() const _NOEXCEPT {
_LIBCPP_ASSERT_INTERNAL(!__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
return __r_.first().__s.__size_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_long_size(size_type __s) _NOEXCEPT {
- __r_.first().__l.__size_ = __s;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __get_long_size() const _NOEXCEPT {
- return __r_.first().__l.__size_;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_size(size_type __s) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __set_long_size(size_type __s) _NOEXCEPT { __r_.first().__l.__size_ = __s; }
+ _LIBCPP_HIDE_FROM_ABI size_type __get_long_size() const _NOEXCEPT { return __r_.first().__l.__size_; }
+ _LIBCPP_HIDE_FROM_ABI void __set_size(size_type __s) _NOEXCEPT {
if (__is_long())
__set_long_size(__s);
else
__set_short_size(__s);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_long_cap(size_type __s) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __set_long_cap(size_type __s) _NOEXCEPT {
__r_.first().__l.__cap_ = __s / __endian_factor;
__r_.first().__l.__is_long_ = true;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __get_long_cap() const _NOEXCEPT {
- return __r_.first().__l.__cap_ * __endian_factor;
- }
+ _LIBCPP_HIDE_FROM_ABI size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_long_pointer(pointer __p) _NOEXCEPT {
- __r_.first().__l.__data_ = __p;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __get_long_pointer() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __set_long_pointer(pointer __p) _NOEXCEPT { __r_.first().__l.__data_ = __p; }
+ _LIBCPP_HIDE_FROM_ABI pointer __get_long_pointer() _NOEXCEPT {
return _LIBCPP_ASAN_VOLATILE_WRAPPER(__r_.first().__l.__data_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_pointer __get_long_pointer() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_pointer __get_long_pointer() const _NOEXCEPT {
return _LIBCPP_ASAN_VOLATILE_WRAPPER(__r_.first().__l.__data_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS pointer
- __get_short_pointer() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS pointer __get_short_pointer() _NOEXCEPT {
return _LIBCPP_ASAN_VOLATILE_WRAPPER(pointer_traits<pointer>::pointer_to(__r_.first().__s.__data_[0]));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS const_pointer
- __get_short_pointer() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS const_pointer __get_short_pointer() const _NOEXCEPT {
return _LIBCPP_ASAN_VOLATILE_WRAPPER(pointer_traits<const_pointer>::pointer_to(__r_.first().__s.__data_[0]));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __get_pointer() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI pointer __get_pointer() _NOEXCEPT {
return __is_long() ? __get_long_pointer() : __get_short_pointer();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_pointer __get_pointer() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_pointer __get_pointer() const _NOEXCEPT {
return __is_long() ? __get_long_pointer() : __get_short_pointer();
}
// The following functions are no-ops outside of AddressSanitizer mode.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
- __annotate_contiguous_container(const void* __old_mid, const void* __new_mid) const {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_contiguous_container(const void* __old_mid, const void* __new_mid) const {
(void)__old_mid;
(void)__new_mid;
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
@@ -1687,7 +1577,7 @@ private:
#endif
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_new(size_type __current_size) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_new(size_type __current_size) const _NOEXCEPT {
(void)__current_size;
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
if (!__libcpp_is_constant_evaluated())
@@ -1695,14 +1585,14 @@ private:
#endif
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_delete() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT {
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
if (!__libcpp_is_constant_evaluated())
__annotate_contiguous_container(data() + size() + 1, data() + capacity() + 1);
#endif
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_increase(size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_increase(size_type __n) const _NOEXCEPT {
(void)__n;
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
if (!__libcpp_is_constant_evaluated())
@@ -1710,7 +1600,7 @@ private:
#endif
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
(void)__old_size;
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
if (!__libcpp_is_constant_evaluated())
@@ -1719,11 +1609,11 @@ private:
}
template <size_type __a>
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __align_it(size_type __s) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI size_type __align_it(size_type __s) _NOEXCEPT {
return (__s + (__a - 1)) & ~(__a - 1);
}
enum { __alignment = 8 };
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __recommend(size_type __s) _NOEXCEPT {
+ static _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __s) _NOEXCEPT {
if (__s < __min_cap) {
return static_cast<size_type>(__min_cap) - 1;
}
@@ -1734,9 +1624,9 @@ private:
return __guess;
}
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(const value_type* __s, size_type __sz, size_type __reserve);
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(const value_type* __s, size_type __sz);
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(size_type __n, value_type __c);
+ inline void __init(const value_type* __s, size_type __sz, size_type __reserve);
+ inline void __init(const value_type* __s, size_type __sz);
+ inline void __init(size_type __n, value_type __c);
// Slow path for the (inlined) copy constructor for 'long' strings.
// Always externally instantiated and not inlined.
@@ -1746,22 +1636,19 @@ private:
// to call the __init() functions as those are marked as inline which may
// result in over-aggressive inlining by the compiler, where our aim is
// to only inline the fast path code directly in the ctor.
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE void __init_copy_ctor_external(const value_type* __s, size_type __sz);
+ _LIBCPP_NOINLINE void __init_copy_ctor_external(const value_type* __s, size_type __sz);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(_InputIterator __first, _InputIterator __last);
+ inline void __init(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(_ForwardIterator __first, _ForwardIterator __last);
+ inline void __init(_ForwardIterator __first, _ForwardIterator __last);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
- __init_with_sentinel(_InputIterator __first, _Sentinel __last);
+ _LIBCPP_HIDE_FROM_ABI void __init_with_sentinel(_InputIterator __first, _Sentinel __last);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
- __init_with_size(_InputIterator __first, _Sentinel __last, size_type __sz);
+ _LIBCPP_HIDE_FROM_ABI void __init_with_size(_InputIterator __first, _Sentinel __last, size_type __sz);
- _LIBCPP_CONSTEXPR_SINCE_CXX20
#if _LIBCPP_ABI_VERSION >= 2 // We want to use the function in the dylib in ABIv1
_LIBCPP_HIDE_FROM_ABI
#endif
@@ -1772,14 +1659,14 @@ private:
size_type __n_copy,
size_type __n_del,
size_type __n_add = 0);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __grow_by_without_replace(
+ _LIBCPP_HIDE_FROM_ABI void __grow_by_without_replace(
size_type __old_cap,
size_type __delta_cap,
size_type __old_sz,
size_type __n_copy,
size_type __n_del,
size_type __n_add = 0);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 void __grow_by_and_replace(
+ void __grow_by_and_replace(
size_type __old_cap,
size_type __delta_cap,
size_type __old_sz,
@@ -1792,22 +1679,22 @@ private:
// have proof that the input does not alias the current instance.
// For example, operator=(basic_string) performs a 'self' check.
template <bool __is_short>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string& __assign_no_alias(const value_type* __s, size_type __n);
+ _LIBCPP_NOINLINE basic_string& __assign_no_alias(const value_type* __s, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __erase_to_end(size_type __pos) {
+ _LIBCPP_HIDE_FROM_ABI void __erase_to_end(size_type __pos) {
__null_terminate_at(std::__to_address(__get_pointer()), __pos);
}
// __erase_external_with_move is invoked for erase() invocations where
// `n ~= npos`, likely requiring memory moves on the string data.
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE void __erase_external_with_move(size_type __pos, size_type __n);
+ _LIBCPP_NOINLINE void __erase_external_with_move(size_type __pos, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const basic_string& __str) {
__copy_assign_alloc(
__str, integral_constant<bool, __alloc_traits::propagate_on_container_copy_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str, true_type) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const basic_string& __str, true_type) {
if (__alloc() == __str.__alloc())
__alloc() = __str.__alloc();
else {
@@ -1830,28 +1717,22 @@ private:
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
- __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(basic_string& __str)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(basic_string& __str) {
__move_assign_alloc(
__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(basic_string& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
- __alloc() = std::move(__c.__alloc());
- }
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(basic_string& __c, true_type) { __alloc() = std::move(__c.__alloc()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(basic_string&, false_type) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(basic_string&, false_type) _NOEXCEPT {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string& __assign_external(const value_type* __s);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string& __assign_external(const value_type* __s, size_type __n);
+ _LIBCPP_NOINLINE basic_string& __assign_external(const value_type* __s);
+ _LIBCPP_NOINLINE basic_string& __assign_external(const value_type* __s, size_type __n);
// Assigns the value in __s, guaranteed to be __n < __min_cap in length.
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_short(const value_type* __s, size_type __n) {
+ inline basic_string& __assign_short(const value_type* __s, size_type __n) {
size_type __old_size = size();
if (__n > __old_size)
__annotate_increase(__n - __old_size);
@@ -1864,8 +1745,7 @@ private:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
- __null_terminate_at(value_type* __p, size_type __newsz) {
+ _LIBCPP_HIDE_FROM_ABI basic_string& __null_terminate_at(value_type* __p, size_type __newsz) {
size_type __old_size = size();
if (__newsz > __old_size)
__annotate_increase(__newsz - __old_size);
@@ -1877,7 +1757,7 @@ private:
}
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __addr_in_range(const _Tp& __v) const {
+ _LIBCPP_HIDE_FROM_ABI bool __addr_in_range(const _Tp& __v) const {
return std::__is_pointer_in_range(data(), data() + size() + 1, std::addressof(__v));
}
@@ -1889,11 +1769,11 @@ private:
std::__throw_out_of_range("basic_string");
}
- friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+ <>(const basic_string&, const basic_string&);
- friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+ <>(const value_type*, const basic_string&);
- friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+ <>(value_type, const basic_string&);
- friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+ <>(const basic_string&, const value_type*);
- friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+ <>(const basic_string&, value_type);
+ friend basic_string operator+ <>(const basic_string&, const basic_string&);
+ friend basic_string operator+ <>(const value_type*, const basic_string&);
+ friend basic_string operator+ <>(value_type, const basic_string&);
+ friend basic_string operator+ <>(const basic_string&, const value_type*);
+ friend basic_string operator+ <>(const basic_string&, value_type);
};
// These declarations must appear before any functions are implicitly used
@@ -1913,8 +1793,7 @@ _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
#undef _LIBCPP_DECLARE
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz, size_type __reserve) {
+void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz, size_type __reserve) {
if (__libcpp_is_constant_evaluated())
__r_.first() = __rep();
if (__reserve > max_size())
@@ -1937,8 +1816,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz) {
+void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz) {
if (__libcpp_is_constant_evaluated())
__r_.first() = __rep();
if (__sz > max_size())
@@ -1961,7 +1839,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE void
+_LIBCPP_NOINLINE void
basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(const value_type* __s, size_type __sz) {
if (__libcpp_is_constant_evaluated())
__r_.first() = __rep();
@@ -1985,7 +1863,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(const value
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c) {
+void basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c) {
if (__libcpp_is_constant_evaluated())
__r_.first() = __rep();
@@ -2010,14 +1888,13 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last) {
+void basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last) {
__init_with_sentinel(std::move(__first), std::move(__last));
}
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+_LIBCPP_HIDE_FROM_ABI void
basic_string<_CharT, _Traits, _Allocator>::__init_with_sentinel(_InputIterator __first, _Sentinel __last) {
__r_.first() = __rep();
__annotate_new(0);
@@ -2039,15 +1916,14 @@ basic_string<_CharT, _Traits, _Allocator>::__init_with_sentinel(_InputIterator _
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
-basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last) {
+void basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last) {
size_type __sz = static_cast<size_type>(std::distance(__first, __last));
__init_with_size(__first, __last, __sz);
}
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+_LIBCPP_HIDE_FROM_ABI void
basic_string<_CharT, _Traits, _Allocator>::__init_with_size(_InputIterator __first, _Sentinel __last, size_type __sz) {
if (__libcpp_is_constant_evaluated())
__r_.first() = __rep();
@@ -2085,7 +1961,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init_with_size(_InputIterator __fir
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace(
+void basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace(
size_type __old_cap,
size_type __delta_cap,
size_type __old_sz,
@@ -2125,17 +2001,17 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__
// may also not set the size at all when the string was short initially. This leads to unpredictable size value. It is
// not removed or changed to avoid breaking the ABI.
template <class _CharT, class _Traits, class _Allocator>
-void _LIBCPP_CONSTEXPR_SINCE_CXX20
+void
#if _LIBCPP_ABI_VERSION >= 2 // We want to use the function in the dylib in ABIv1
-_LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
#endif
-_LIBCPP_DEPRECATED_("use __grow_by_without_replace") basic_string<_CharT, _Traits, _Allocator>::__grow_by(
- size_type __old_cap,
- size_type __delta_cap,
- size_type __old_sz,
- size_type __n_copy,
- size_type __n_del,
- size_type __n_add) {
+ _LIBCPP_DEPRECATED_("use __grow_by_without_replace") basic_string<_CharT, _Traits, _Allocator>::__grow_by(
+ size_type __old_cap,
+ size_type __delta_cap,
+ size_type __old_sz,
+ size_type __n_copy,
+ size_type __n_del,
+ size_type __n_add) {
size_type __ms = max_size();
if (__delta_cap > __ms - __old_cap)
__throw_length_error();
@@ -2159,8 +2035,7 @@ _LIBCPP_DEPRECATED_("use __grow_by_without_replace") basic_string<_CharT, _Trait
}
template <class _CharT, class _Traits, class _Allocator>
-void _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
-basic_string<_CharT, _Traits, _Allocator>::__grow_by_without_replace(
+void _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>::__grow_by_without_replace(
size_type __old_cap,
size_type __delta_cap,
size_type __old_sz,
@@ -2178,7 +2053,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_without_replace(
template <class _CharT, class _Traits, class _Allocator>
template <bool __is_short>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
+_LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(const value_type* __s, size_type __n) {
size_type __cap = __is_short ? static_cast<size_type>(__min_cap) : __get_long_cap();
if (__n < __cap) {
@@ -2199,7 +2074,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(const value_type* _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
+_LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* __s, size_type __n) {
size_type __cap = capacity();
if (__cap >= __n) {
@@ -2217,14 +2092,14 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n) {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::assign received nullptr");
return (__builtin_constant_p(__n) && __fits_in_sso(__n)) ? __assign_short(__s, __n) : __assign_external(__s, __n);
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c) {
size_type __cap = capacity();
size_type __old_size = size();
@@ -2240,8 +2115,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c) {
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c) {
pointer __p;
size_type __old_size = size();
if (__old_size == 0)
@@ -2261,7 +2135,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c) {
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string<_CharT, _Traits, _Allocator>&
+_LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str) {
if (this != std::addressof(__str)) {
__copy_assign_alloc(__str);
@@ -2285,7 +2159,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _InputIterator __last) {
__assign_with_sentinel(__first, __last);
return *this;
@@ -2293,7 +2167,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+_LIBCPP_HIDE_FROM_ABI void
basic_string<_CharT, _Traits, _Allocator>::__assign_with_sentinel(_InputIterator __first, _Sentinel __last) {
const basic_string __temp(__init_with_sentinel_tag(), std::move(__first), std::move(__last), __alloc());
assign(__temp.data(), __temp.size());
@@ -2301,7 +2175,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_with_sentinel(_InputIterator
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) {
if (__string_is_trivial_iterator<_ForwardIterator>::value) {
size_type __n = static_cast<size_type>(std::distance(__first, __last));
@@ -2315,7 +2189,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _For
template <class _CharT, class _Traits, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+_LIBCPP_HIDE_FROM_ABI void
basic_string<_CharT, _Traits, _Allocator>::__assign_trivial(_Iterator __first, _Sentinel __last, size_type __n) {
_LIBCPP_ASSERT_INTERNAL(
__string_is_trivial_iterator<_Iterator>::value, "The iterator type given to `__assign_trivial` must be trivial");
@@ -2344,7 +2218,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_trivial(_Iterator __first, _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n) {
size_type __sz = __str.size();
if (__pos > __sz)
@@ -2357,7 +2231,7 @@ template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp& __t, size_type __pos, size_type __n) {
__self_view __sv = __t;
size_type __sz = __sv.size();
@@ -2367,14 +2241,13 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp& __t, size_type __po
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
+_LIBCPP_NOINLINE basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* __s) {
return __assign_external(__s, traits_type::length(__s));
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s) {
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::assign received nullptr");
return __builtin_constant_p(*__s)
? (__fits_in_sso(traits_type::length(__s)) ? __assign_short(__s, traits_type::length(__s))
@@ -2384,7 +2257,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s) {
// append
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n) {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::append received nullptr");
size_type __cap = capacity();
@@ -2404,7 +2277,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c) {
if (__n) {
size_type __cap = capacity();
@@ -2422,8 +2295,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
-basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n) {
+inline void basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n) {
if (__n) {
size_type __cap = capacity();
size_type __sz = size();
@@ -2438,7 +2310,7 @@ basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c) {
+void basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c) {
bool __is_short = !__is_long();
size_type __cap;
size_type __sz;
@@ -2469,7 +2341,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::pu
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(_ForwardIterator __first, _ForwardIterator __last) {
size_type __sz = size();
size_type __cap = capacity();
@@ -2491,7 +2363,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(_ForwardIterator __first, _For
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n) {
size_type __sz = __str.size();
if (__pos > __sz)
@@ -2504,7 +2376,7 @@ template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const _Tp& __t, size_type __pos, size_type __n) {
__self_view __sv = __t;
size_type __sz = __sv.size();
@@ -2514,8 +2386,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const _Tp& __t, size_type __po
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s) {
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::append received nullptr");
return append(__s, traits_type::length(__s));
}
@@ -2523,7 +2394,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s) {
// insert
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n) {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::insert received nullptr");
size_type __sz = size();
@@ -2551,7 +2422,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_t
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c) {
size_type __sz = size();
if (__pos > __sz)
@@ -2579,7 +2450,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
+typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIterator __first, _InputIterator __last) {
const basic_string __temp(__first, __last, __alloc());
return insert(__pos, __temp.data(), __temp.data() + __temp.size());
@@ -2587,8 +2458,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIt
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
-basic_string<_CharT, _Traits, _Allocator>::insert(
+typename basic_string<_CharT, _Traits, _Allocator>::iterator basic_string<_CharT, _Traits, _Allocator>::insert(
const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last) {
auto __n = static_cast<size_type>(std::distance(__first, __last));
return __insert_with_size(__pos, __first, __last, __n);
@@ -2596,7 +2466,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(
template <class _CharT, class _Traits, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
+typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::__insert_with_size(
const_iterator __pos, _Iterator __first, _Sentinel __last, size_type __n) {
size_type __ip = static_cast<size_type>(__pos - begin());
@@ -2612,8 +2482,7 @@ basic_string<_CharT, _Traits, _Allocator>::__insert_with_size(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::insert(
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::insert(
size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) {
size_type __str_sz = __str.size();
if (__pos2 > __str_sz)
@@ -2626,7 +2495,7 @@ template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n) {
__self_view __sv = __t;
size_type __str_sz = __sv.size();
@@ -2636,14 +2505,14 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const _Tp& _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::insert received nullptr");
return insert(__pos, __s, traits_type::length(__s));
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
+typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_type __c) {
size_type __ip = static_cast<size_type>(__pos - begin());
size_type __sz = size();
@@ -2668,8 +2537,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_ty
// replace
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::replace(
size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK {
_LIBCPP_ASSERT_NON_NULL(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
@@ -2713,7 +2581,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, size_type __n2, value_type __c) {
size_type __sz = size();
if (__pos > __sz)
@@ -2740,16 +2608,14 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::replace(
const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2) {
const basic_string __temp(__j1, __j2, __alloc());
return replace(__i1, __i2, __temp);
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::replace(
size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) {
size_type __str_sz = __str.size();
if (__pos2 > __str_sz)
@@ -2762,8 +2628,7 @@ template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(
+basic_string<_CharT, _Traits, _Allocator>& basic_string<_CharT, _Traits, _Allocator>::replace(
size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2) {
__self_view __sv = __t;
size_type __str_sz = __sv.size();
@@ -2773,7 +2638,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s) {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::replace received nullptr");
return replace(__pos, __n1, __s, traits_type::length(__s));
@@ -2784,7 +2649,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
// 'externally instantiated' erase() implementation, called when __n != npos.
// Does not check __pos against size()
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NOINLINE void
+_LIBCPP_NOINLINE void
basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(size_type __pos, size_type __n) {
if (__n) {
size_type __sz = size();
@@ -2798,7 +2663,7 @@ basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(size_type
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos, size_type __n) {
if (__pos > size())
__throw_out_of_range();
@@ -2811,7 +2676,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos, size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
+inline typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__pos != end(), "string::erase(iterator) called with a non-dereferenceable iterator");
@@ -2822,7 +2687,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos) {
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
+inline typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_iterator __last) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "string::erase(first, last) called with invalid range");
iterator __b = begin();
@@ -2832,13 +2697,13 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_i
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::pop_back() {
+inline void basic_string<_CharT, _Traits, _Allocator>::pop_back() {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::pop_back(): string is already empty");
__erase_to_end(size() - 1);
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT {
+inline void basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT {
size_type __old_size = size();
if (__is_long()) {
traits_type::assign(*__get_long_pointer(), value_type());
@@ -2851,7 +2716,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocat
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c) {
+void basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c) {
size_type __sz = size();
if (__n > __sz)
append(__n - __sz, __c);
@@ -2860,8 +2725,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::re
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
-basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n) {
+inline void basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n) {
size_type __sz = size();
if (__n > __sz) {
__append_default_init(__n - __sz);
@@ -2870,7 +2734,7 @@ basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity) {
+void basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity) {
if (__requested_capacity > max_size())
__throw_length_error();
@@ -2889,7 +2753,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::re
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT {
+inline void basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT {
size_type __target_capacity = __recommend(size());
if (__target_capacity == capacity())
return;
@@ -2898,8 +2762,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocat
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity) {
+inline void basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity) {
__annotate_delete();
size_type __cap = capacity();
size_type __sz = size();
@@ -2961,7 +2824,7 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::const_reference
+typename basic_string<_CharT, _Traits, _Allocator>::const_reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const {
if (__n >= size())
__throw_out_of_range();
@@ -2969,7 +2832,7 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const {
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::reference
+typename basic_string<_CharT, _Traits, _Allocator>::reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) {
if (__n >= size())
__throw_out_of_range();
@@ -2977,7 +2840,7 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) {
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) const {
size_type __sz = size();
if (__pos > __sz)
@@ -2988,9 +2851,7 @@ basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n,
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
-{
+inline void basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str) {
_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
__alloc_traits::propagate_on_container_swap::value || __alloc_traits::is_always_equal::value ||
__alloc() == __str.__alloc(),
@@ -3018,28 +2879,28 @@ struct _LIBCPP_HIDDEN __traits_eq {
};
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::find(): received nullptr");
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
}
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __sv.data(), __pos, __sv.size());
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::find(): received nullptr");
return std::__str_find<value_type, size_type, traits_type, npos>(
@@ -3047,7 +2908,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s, size_type
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(value_type __c, size_type __pos) const _NOEXCEPT {
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
@@ -3055,29 +2916,28 @@ basic_string<_CharT, _Traits, _Allocator>::find(value_type __c, size_type __pos)
// rfind
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
-basic_string<_CharT, _Traits, _Allocator>::rfind(
+typename basic_string<_CharT, _Traits, _Allocator>::size_type basic_string<_CharT, _Traits, _Allocator>::rfind(
const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
}
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __sv.data(), __pos, __sv.size());
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::rfind(): received nullptr");
return std::__str_rfind<value_type, size_type, traits_type, npos>(
@@ -3085,7 +2945,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s, size_typ
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c, size_type __pos) const _NOEXCEPT {
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
@@ -3093,15 +2953,14 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c, size_type __pos
// find_first_of
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
-basic_string<_CharT, _Traits, _Allocator>::find_first_of(
+typename basic_string<_CharT, _Traits, _Allocator>::size_type basic_string<_CharT, _Traits, _Allocator>::find_first_of(
const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(
data(), size(), __str.data(), __pos, __str.size());
@@ -3109,7 +2968,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __s
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(
@@ -3117,7 +2976,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::find_first_of(): received nullptr");
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(
@@ -3125,7 +2984,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c, size_type __pos) const _NOEXCEPT {
return find(__c, __pos);
}
@@ -3133,7 +2992,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c, size_ty
// find_last_of
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(
const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
@@ -3141,7 +3000,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(
data(), size(), __str.data(), __pos, __str.size());
@@ -3149,7 +3008,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __st
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(
@@ -3157,7 +3016,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t, size_typ
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::find_last_of(): received nullptr");
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(
@@ -3165,7 +3024,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s, s
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c, size_type __pos) const _NOEXCEPT {
return rfind(__c, __pos);
}
@@ -3173,7 +3032,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c, size_typ
// find_first_not_of
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(
const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
@@ -3181,7 +3040,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(
const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(
@@ -3190,7 +3049,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(
@@ -3198,7 +3057,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t, siz
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::find_first_not_of(): received nullptr");
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(
@@ -3206,7 +3065,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* _
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c, size_type __pos) const _NOEXCEPT {
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
@@ -3214,7 +3073,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c, siz
// find_last_not_of
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(
const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
@@ -3222,7 +3081,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(
const basic_string& __str, size_type __pos) const _NOEXCEPT {
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(
@@ -3231,7 +3090,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t, size_type __pos) const _NOEXCEPT {
__self_view __sv = __t;
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(
@@ -3239,7 +3098,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t, size
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s, size_type __pos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::find_last_not_of(): received nullptr");
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(
@@ -3247,7 +3106,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c, size_type __pos) const _NOEXCEPT {
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
@@ -3256,7 +3115,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c, size
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCEPT {
+int basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCEPT {
__self_view __sv = __t;
size_t __lhs_sz = size();
size_t __rhs_sz = __sv.size();
@@ -3271,13 +3130,12 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::com
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 int
-basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT {
+inline int basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT {
return compare(__self_view(__str));
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::compare(
+inline int basic_string<_CharT, _Traits, _Allocator>::compare(
size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const {
_LIBCPP_ASSERT_NON_NULL(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
size_type __sz = size();
@@ -3296,14 +3154,13 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocato
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int
-basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const _Tp& __t) const {
+int basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const _Tp& __t) const {
__self_view __sv = __t;
return compare(__pos1, __n1, __sv.data(), __sv.size());
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 int
+inline int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const basic_string& __str) const {
return compare(__pos1, __n1, __str.data(), __str.size());
}
@@ -3313,28 +3170,26 @@ template <class _Tp,
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::compare(
+int basic_string<_CharT, _Traits, _Allocator>::compare(
size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2) const {
__self_view __sv = __t;
return __self_view(*this).substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::compare(
+int basic_string<_CharT, _Traits, _Allocator>::compare(
size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const {
return compare(__pos1, __n1, __self_view(__str), __pos2, __n2);
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int
-basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT {
+int basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::compare(): received nullptr");
return compare(0, npos, __s, traits_type::length(__s));
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 int
-basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const value_type* __s) const {
+int basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const value_type* __s) const {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string::compare(): received nullptr");
return compare(__pos1, __n1, __s, traits_type::length(__s));
}
@@ -3342,7 +3197,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type _
// __invariants
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 bool basic_string<_CharT, _Traits, _Allocator>::__invariants() const {
+inline bool basic_string<_CharT, _Traits, _Allocator>::__invariants() const {
if (size() > capacity())
return false;
if (capacity() < __min_cap - 1)
@@ -3357,7 +3212,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 bool basic_string<_CharT, _Traits, _Allocat
// __clear_and_shrink
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT {
+inline void basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT {
clear();
if (__is_long()) {
__annotate_delete();
@@ -3369,17 +3224,15 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocat
// operator==
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
-operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
- const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
+ const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT {
size_t __lhs_sz = __lhs.size();
return __lhs_sz == __rhs.size() && _Traits::compare(__lhs.data(), __rhs.data(), __lhs_sz) == 0;
}
template <class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
-operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
- const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
+ const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT {
size_t __sz = __lhs.size();
if (__sz != __rhs.size())
return false;
@@ -3398,7 +3251,7 @@ operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>&
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) _NOEXCEPT {
typedef basic_string<_CharT, _Traits, _Allocator> _String;
_LIBCPP_ASSERT_NON_NULL(__rhs != nullptr, "operator==(basic_string, char*): received nullptr");
@@ -3509,7 +3362,7 @@ operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>&
// operator +
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) {
using _String = basic_string<_CharT, _Traits, _Allocator>;
@@ -3526,7 +3379,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDDEN basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs) {
using _String = basic_string<_CharT, _Traits, _Allocator>;
auto __lhs_sz = _Traits::length(__lhs);
@@ -3542,7 +3395,7 @@ operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>&
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs) {
using _String = basic_string<_CharT, _Traits, _Allocator>;
typename _String::size_type __rhs_sz = __rhs.size();
@@ -3557,7 +3410,7 @@ operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+inline basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) {
using _String = basic_string<_CharT, _Traits, _Allocator>;
typename _String::size_type __lhs_sz = __lhs.size();
@@ -3573,7 +3426,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT*
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
+_LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs) {
using _String = basic_string<_CharT, _Traits, _Allocator>;
typename _String::size_type __lhs_sz = __lhs.size();
@@ -3590,9 +3443,8 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
// swap
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
-swap(basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>& __rhs)
- _NOEXCEPT_(_NOEXCEPT_(__lhs.swap(__rhs))) {
+inline _LIBCPP_HIDE_FROM_ABI void
+swap(basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>& __rhs) {
__lhs.swap(__rhs);
}
diff --git a/libcxx/include/__cxx03/string_view b/libcxx/include/__cxx03/string_view
index 9e5f0acb6495d..da9003b635bb9 100644
--- a/libcxx/include/__cxx03/string_view
+++ b/libcxx/include/__cxx03/string_view
@@ -249,8 +249,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// TODO: This is a workaround for some vendors to carry a downstream diff to accept `nullptr` in
// string_view constructors. This can be refactored when this exact form isn't needed anymore.
template <class _Traits>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR inline size_t
-__char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
// This needs to be a single statement for C++11 constexpr
return _LIBCPP_ASSERT_NON_NULL(
__s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"),
@@ -274,12 +273,12 @@ public:
#else
using const_iterator = const_pointer;
#endif
- using iterator = const_iterator;
- using const_reverse_iterator = std::reverse_iterator<const_iterator>;
- using reverse_iterator = const_reverse_iterator;
- using size_type = size_t;
- using difference_type = ptrdiff_t;
- static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
+ using iterator = const_iterator;
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
+ using reverse_iterator = const_reverse_iterator;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
+ static const size_type npos = -1; // size_type(-1);
static_assert(!is_array<value_type>::value, "Character type of basic_string_view must not be an array");
static_assert(is_standard_layout<value_type>::value, "Character type of basic_string_view must be standard-layout");
@@ -288,25 +287,25 @@ public:
"traits_type::char_type must be the same type as CharT");
// [string.view.cons], construct/copy
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view() _NOEXCEPT : __data_(nullptr), __size_(0) {}
+ _LIBCPP_HIDE_FROM_ABI basic_string_view() _NOEXCEPT : __data_(nullptr), __size_(0) {}
_LIBCPP_HIDE_FROM_ABI basic_string_view(const basic_string_view&) _NOEXCEPT = default;
_LIBCPP_HIDE_FROM_ABI basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default;
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
: __data_(__s),
__size_(__len) {}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s)
+ _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s)
: __data_(__s), __size_(std::__char_traits_length_checked<_Traits>(__s)) {}
// [string.view.iterators], iterators
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return cbegin(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return cbegin(); }
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return cend(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return cend(); }
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
return std::__make_bounded_iter(data(), data(), data() + size());
#else
@@ -314,7 +313,7 @@ public:
#endif
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
@@ -322,65 +321,57 @@ public:
#endif
}
- _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
- return const_reverse_iterator(cend());
- }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
- return const_reverse_iterator(cbegin());
- }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
- _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
- return const_reverse_iterator(cend());
- }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT {
- return const_reverse_iterator(cbegin());
- }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
// [string.view.capacity], capacity
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __size_; }
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __size_; }
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI size_type length() const _NOEXCEPT { return __size_; }
+ _LIBCPP_HIDE_FROM_ABI size_type length() const _NOEXCEPT { return __size_; }
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
return numeric_limits<size_type>::max() / sizeof(value_type);
}
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT { return __size_ == 0; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __size_ == 0; }
// [string.view.access], element access
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __pos) const _NOEXCEPT {
return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos < size(), "string_view[] index out of bounds"), __data_[__pos];
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __pos) const {
+ _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __pos) const {
return __pos >= size() ? (__throw_out_of_range("string_view::at"), __data_[0]) : __data_[__pos];
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string_view::front(): string is empty"), __data_[0];
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string_view::back(): string is empty"), __data_[__size_ - 1];
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI const_pointer data() const _NOEXCEPT { return __data_; }
+ _LIBCPP_HIDE_FROM_ABI const_pointer data() const _NOEXCEPT { return __data_; }
// [string.view.modifiers], modifiers:
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI void remove_prefix(size_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void remove_prefix(size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n <= size(), "remove_prefix() can't remove more than size()");
__data_ += __n;
__size_ -= __n;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI void remove_suffix(size_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void remove_suffix(size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n <= size(), "remove_suffix() can't remove more than size()");
__size_ -= __n;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI void swap(basic_string_view& __other) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void swap(basic_string_view& __other) _NOEXCEPT {
const value_type* __p = __data_;
__data_ = __other.__data_;
__other.__data_ = __p;
@@ -390,8 +381,7 @@ public:
__other.__size_ = __sz;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
- copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
+ _LIBCPP_HIDE_FROM_ABI size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
if (__pos > size())
__throw_out_of_range("string_view::copy");
size_type __rlen = std::min(__n, size() - __pos);
@@ -399,12 +389,12 @@ public:
return __rlen;
}
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view substr(size_type __pos = 0, size_type __n = npos) const {
+ _LIBCPP_HIDE_FROM_ABI basic_string_view substr(size_type __pos = 0, size_type __n = npos) const {
return __pos > size() ? (__throw_out_of_range("string_view::substr"), basic_string_view())
: basic_string_view(data() + __pos, std::min(__n, size() - __pos));
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 int compare(basic_string_view __sv) const _NOEXCEPT {
+ int compare(basic_string_view __sv) const _NOEXCEPT {
size_type __rlen = std::min(size(), __sv.size());
int __retval = _Traits::compare(data(), __sv.data(), __rlen);
if (__retval == 0) // first __rlen chars matched
@@ -412,180 +402,152 @@ public:
return __retval;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int
- compare(size_type __pos1, size_type __n1, basic_string_view __sv) const {
+ _LIBCPP_HIDE_FROM_ABI int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const {
return substr(__pos1, __n1).compare(__sv);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int
+ _LIBCPP_HIDE_FROM_ABI int
compare(size_type __pos1, size_type __n1, basic_string_view __sv, size_type __pos2, size_type __n2) const {
return substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int compare(const _CharT* __s) const _NOEXCEPT {
- return compare(basic_string_view(__s));
- }
+ _LIBCPP_HIDE_FROM_ABI int compare(const _CharT* __s) const _NOEXCEPT { return compare(basic_string_view(__s)); }
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int
- compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
+ _LIBCPP_HIDE_FROM_ABI int compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
return substr(__pos1, __n1).compare(basic_string_view(__s));
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int
- compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const {
+ _LIBCPP_HIDE_FROM_ABI int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const {
return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
}
// find
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find(): received nullptr");
return std::__str_find<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
}
// rfind
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- rfind(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type rfind(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::rfind(): received nullptr");
return std::__str_rfind<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
}
// find_first_of
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received nullptr");
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(
data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
return find(__c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_of(): received nullptr");
return std::__str_find_first_of<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
}
// find_last_of
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nullptr");
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(
data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
return rfind(__c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_of(): received nullptr");
return std::__str_find_last_of<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
}
// find_first_not_of
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_not_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(
__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(
data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_not_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT {
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_first_not_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
}
// find_last_not_of
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_not_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(
__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(
data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_not_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT {
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI size_type
- find_last_not_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
_LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>(
data(), size(), __s, __pos, traits_type::length(__s));
@@ -600,7 +562,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_string_view);
// operator ==
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return false;
@@ -610,18 +572,16 @@ operator==(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _
// The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409326 for details.
// This applies to the other sufficient overloads below for the other comparison operators.
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator==(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator==(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return false;
return __lhs.compare(__rhs) == 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator==(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator==(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return false;
return __lhs.compare(__rhs) == 0;
@@ -629,7 +589,7 @@ operator==(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
// operator !=
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return true;
@@ -637,18 +597,16 @@ operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _
}
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator!=(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return true;
return __lhs.compare(__rhs) != 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
if (__lhs.size() != __rhs.size())
return true;
return __lhs.compare(__rhs) != 0;
@@ -656,85 +614,77 @@ operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
// operator <
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) < 0;
}
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator<(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) < 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator<(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) < 0;
}
// operator >
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator>(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) > 0;
}
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator>(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) > 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator>(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) > 0;
}
// operator <=
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator<=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) <= 0;
}
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator<=(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<=(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) <= 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator<=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator<=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) <= 0;
}
// operator >=
template <class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
+_LIBCPP_HIDE_FROM_ABI bool
operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) >= 0;
}
template <class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator>=(basic_string_view<_CharT, _Traits> __lhs,
- __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>=(basic_string_view<_CharT, _Traits> __lhs,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) >= 0;
}
template <class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
-operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
- basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI bool operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
+ basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT {
return __lhs.compare(__rhs) >= 0;
}
diff --git a/libcxx/include/__cxx03/typeinfo b/libcxx/include/__cxx03/typeinfo
index ec291ccc5446e..5944d2e1926c7 100644
--- a/libcxx/include/__cxx03/typeinfo
+++ b/libcxx/include/__cxx03/typeinfo
@@ -96,7 +96,7 @@ public:
size_t hash_code() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const type_info& __arg) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI bool operator==(const type_info& __arg) const _NOEXCEPT {
// When evaluated in a constant expression, both type infos simply can't come
// from different translation units, so it is sufficient to compare their addresses.
if (__libcpp_is_constant_evaluated()) {
@@ -182,12 +182,10 @@ public:
struct __type_info_implementations {
struct __string_impl_base {
typedef const char* __type_name_t;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR static const char*
- __type_name_to_string(__type_name_t __v) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
return __v;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR static __type_name_t
- __string_to_type_name(const char* __v) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
return __v;
}
};
@@ -308,7 +306,7 @@ public:
_LIBCPP_HIDE_FROM_ABI size_t hash_code() const _NOEXCEPT { return __impl::__hash(__type_name); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const type_info& __arg) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI bool operator==(const type_info& __arg) const _NOEXCEPT {
// When evaluated in a constant expression, both type infos simply can't come
// from different translation units, so it is sufficient to compare their addresses.
if (__libcpp_is_constant_evaluated()) {
diff --git a/libcxx/include/__cxx03/unordered_map b/libcxx/include/__cxx03/unordered_map
index 20dde0bf017ce..b5c2cbb5a27e2 100644
--- a/libcxx/include/__cxx03/unordered_map
+++ b/libcxx/include/__cxx03/unordered_map
@@ -621,15 +621,14 @@ template <class _Key,
bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
class __unordered_map_hasher : private _Hash {
public:
- _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value) : _Hash() {}
- _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher(const _Hash& __h) _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
- : _Hash(__h) {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() : _Hash() {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher(const _Hash& __h) : _Hash(__h) {}
_LIBCPP_HIDE_FROM_ABI const _Hash& hash_function() const _NOEXCEPT { return *this; }
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Cp& __x) const {
return static_cast<const _Hash&>(*this)(__x.__get_value().first);
}
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Key& __x) const { return static_cast<const _Hash&>(*this)(__x); }
- _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hash>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) {
using std::swap;
swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
}
@@ -640,23 +639,20 @@ class __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, false> {
_Hash __hash_;
public:
- _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
- : __hash_() {}
- _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher(const _Hash& __h) _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
- : __hash_(__h) {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() : __hash_() {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_hasher(const _Hash& __h) : __hash_(__h) {}
_LIBCPP_HIDE_FROM_ABI const _Hash& hash_function() const _NOEXCEPT { return __hash_; }
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Cp& __x) const { return __hash_(__x.__get_value().first); }
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Key& __x) const { return __hash_(__x); }
- _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hash>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) {
using std::swap;
swap(__hash_, __y.__hash_);
}
};
template <class _Key, class _Cp, class _Hash, class _Pred, bool __b>
-inline _LIBCPP_HIDE_FROM_ABI void
-swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
- __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
+ __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y) {
__x.swap(__y);
}
@@ -667,9 +663,8 @@ template <class _Key,
bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value>
class __unordered_map_equal : private _Pred {
public:
- _LIBCPP_HIDE_FROM_ABI __unordered_map_equal() _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value) : _Pred() {}
- _LIBCPP_HIDE_FROM_ABI __unordered_map_equal(const _Pred& __p) _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
- : _Pred(__p) {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_equal() : _Pred() {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_equal(const _Pred& __p) : _Pred(__p) {}
_LIBCPP_HIDE_FROM_ABI const _Pred& key_eq() const _NOEXCEPT { return *this; }
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Cp& __x, const _Cp& __y) const {
return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y.__get_value().first);
@@ -680,7 +675,7 @@ public:
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _Cp& __y) const {
return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);
}
- _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Pred>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) {
using std::swap;
swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
}
@@ -691,10 +686,8 @@ class __unordered_map_equal<_Key, _Cp, _Pred, _Hash, false> {
_Pred __pred_;
public:
- _LIBCPP_HIDE_FROM_ABI __unordered_map_equal() _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
- : __pred_() {}
- _LIBCPP_HIDE_FROM_ABI __unordered_map_equal(const _Pred& __p) _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
- : __pred_(__p) {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_equal() : __pred_() {}
+ _LIBCPP_HIDE_FROM_ABI __unordered_map_equal(const _Pred& __p) : __pred_(__p) {}
_LIBCPP_HIDE_FROM_ABI const _Pred& key_eq() const _NOEXCEPT { return __pred_; }
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Cp& __x, const _Cp& __y) const {
return __pred_(__x.__get_value().first, __y.__get_value().first);
@@ -705,16 +698,15 @@ public:
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _Cp& __y) const {
return __pred_(__x, __y.__get_value().first);
}
- _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Pred>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) {
using std::swap;
swap(__pred_, __y.__pred_);
}
};
template <class _Key, class _Cp, class _Pred, class _Hash, bool __b>
-inline _LIBCPP_HIDE_FROM_ABI void
-swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x, __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x,
+ __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y) {
__x.swap(__y);
}
@@ -935,7 +927,7 @@ public:
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
- _LIBCPP_HIDE_FROM_ABI unordered_map() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
+ _LIBCPP_HIDE_FROM_ABI unordered_map() {}
explicit _LIBCPP_HIDE_FROM_ABI
unordered_map(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
_LIBCPP_HIDE_FROM_ABI
@@ -1008,9 +1000,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __table_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(unordered_map& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) {
- __table_.swap(__u.__table_);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(unordered_map& __u) { __table_.swap(__u.__table_); }
_LIBCPP_HIDE_FROM_ABI hasher hash_function() const { return __table_.hash_function().hash_function(); }
_LIBCPP_HIDE_FROM_ABI key_equal key_eq() const { return __table_.key_eq().key_eq(); }
@@ -1162,8 +1152,7 @@ const _Tp& unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) {
__x.swap(__y);
}
@@ -1243,7 +1232,7 @@ public:
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
- _LIBCPP_HIDE_FROM_ABI unordered_multimap() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
+ _LIBCPP_HIDE_FROM_ABI unordered_multimap() {}
explicit _LIBCPP_HIDE_FROM_ABI
unordered_multimap(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
_LIBCPP_HIDE_FROM_ABI
@@ -1318,9 +1307,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __table_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(unordered_multimap& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) {
- __table_.swap(__u.__table_);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(unordered_multimap& __u) { __table_.swap(__u.__table_); }
_LIBCPP_HIDE_FROM_ABI hasher hash_function() const { return __table_.hash_function().hash_function(); }
_LIBCPP_HIDE_FROM_ABI key_equal key_eq() const { return __table_.key_eq().key_eq(); }
@@ -1427,9 +1414,8 @@ inline void unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIt
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI void
-swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/unordered_set b/libcxx/include/__cxx03/unordered_set
index abd1679746d9e..0e0b5ca50e49c 100644
--- a/libcxx/include/__cxx03/unordered_set
+++ b/libcxx/include/__cxx03/unordered_set
@@ -599,7 +599,7 @@ public:
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
- _LIBCPP_HIDE_FROM_ABI unordered_set() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
+ _LIBCPP_HIDE_FROM_ABI unordered_set() {}
explicit _LIBCPP_HIDE_FROM_ABI
unordered_set(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
@@ -664,7 +664,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __table_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(unordered_set& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) {
+ _LIBCPP_HIDE_FROM_ABI void swap(unordered_set& __u) {
__table_.swap(__u.__table_);
}
@@ -770,8 +770,7 @@ inline void unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator _
template <class _Value, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) {
__x.swap(__y);
}
@@ -830,7 +829,7 @@ public:
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
- _LIBCPP_HIDE_FROM_ABI unordered_multiset() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
+ _LIBCPP_HIDE_FROM_ABI unordered_multiset() {}
explicit _LIBCPP_HIDE_FROM_ABI
unordered_multiset(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
_LIBCPP_HIDE_FROM_ABI
@@ -898,9 +897,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __table_.clear(); }
- _LIBCPP_HIDE_FROM_ABI void swap(unordered_multiset& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) {
- __table_.swap(__u.__table_);
- }
+ _LIBCPP_HIDE_FROM_ABI void swap(unordered_multiset& __u) { __table_.swap(__u.__table_); }
_LIBCPP_HIDE_FROM_ABI hasher hash_function() const { return __table_.hash_function(); }
_LIBCPP_HIDE_FROM_ABI key_equal key_eq() const { return __table_.key_eq(); }
@@ -1008,8 +1005,7 @@ inline void unordered_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputItera
template <class _Value, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI void
-swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
- _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) {
__x.swap(__y);
}
diff --git a/libcxx/include/__cxx03/vector b/libcxx/include/__cxx03/vector
index 7b82e0c88b0ea..b5898a93444b9 100644
--- a/libcxx/include/__cxx03/vector
+++ b/libcxx/include/__cxx03/vector
@@ -408,14 +408,10 @@ public:
static_assert(is_same<typename allocator_type::value_type, value_type>::value,
"Allocator::value_type must be same type as value_type");
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a)
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
- : __end_cap_(nullptr, __a) {
- }
+ _LIBCPP_HIDE_FROM_ABI vector() {}
+ _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a) : __end_cap_(nullptr, __a) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n) {
+ _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n) {
auto __guard = std::__make_exception_guard(__destroy_vector(*this));
if (__n > 0) {
__vallocate(__n);
@@ -424,7 +420,7 @@ public:
__guard.__complete();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __x) {
+ _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __x) {
auto __guard = std::__make_exception_guard(__destroy_vector(*this));
if (__n > 0) {
__vallocate(__n);
@@ -434,7 +430,7 @@ public:
}
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
vector(size_type __n, const value_type& __x, const allocator_type& __a)
: __end_cap_(nullptr, __a) {
if (__n > 0) {
@@ -447,12 +443,12 @@ public:
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
template <
@@ -460,22 +456,22 @@ public:
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last);
template <
class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);
private:
class __destroy_vector {
public:
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}
+ _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void operator()() {
+ _LIBCPP_HIDE_FROM_ABI void operator()() {
if (__vec_.__begin_ != nullptr) {
__vec_.__clear();
__vec_.__annotate_delete();
@@ -488,132 +484,130 @@ private:
};
public:
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~vector() { __destroy_vector (*this)(); }
+ _LIBCPP_HIDE_FROM_ABI ~vector() { __destroy_vector (*this)(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(const vector& __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI vector(const vector& __x);
+ _LIBCPP_HIDE_FROM_ABI
vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector& operator=(const vector& __x);
+ _LIBCPP_HIDE_FROM_ABI vector& operator=(const vector& __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(vector&& __x)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI vector(vector&& __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
vector(vector&& __x, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector& operator=(vector&& __x)
- _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value);
+ _LIBCPP_HIDE_FROM_ABI vector& operator=(vector&& __x);
template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_HIDE_FROM_ABI void assign(_InputIterator __first, _InputIterator __last);
template <
class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI void assign(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const_reference __u);
+ _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const_reference __u);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT {
return this->__alloc();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {
return reverse_iterator(end());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
return const_reverse_iterator(end());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {
return reverse_iterator(begin());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
return const_reverse_iterator(begin());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return begin(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return end(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return begin(); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return end(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
return rbegin();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT {
return static_cast<size_type>(this->__end_ - this->__begin_);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type capacity() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type capacity() const _NOEXCEPT {
return static_cast<size_type>(__end_cap() - this->__begin_);
}
- _LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT {
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT {
return this->__begin_ == this->__end_;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference at(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI reference at(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "front() called on an empty vector");
return *this->__begin_;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "front() called on an empty vector");
return *this->__begin_;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "back() called on an empty vector");
return *(this->__end_ - 1);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "back() called on an empty vector");
return *(this->__end_ - 1);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI value_type* data() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI value_type* data() _NOEXCEPT {
return std::__to_address(this->__begin_);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT {
return std::__to_address(this->__begin_);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
+ _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI
void
emplace_back(_Args&&... __args);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_back();
+ _LIBCPP_HIDE_FROM_ABI void pop_back();
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, value_type&& __x);
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator emplace(const_iterator __position, _Args&&... __args);
+ _LIBCPP_HIDE_FROM_ABI iterator emplace(const_iterator __position, _Args&&... __args);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
insert(const_iterator __position, size_type __n, const_reference __x);
template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible< value_type, typename iterator_traits<_InputIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
template <
@@ -621,25 +615,24 @@ public:
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible< value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
int> = 0>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT {
size_type __old_size = size();
__clear();
__annotate_shrink(__old_size);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz);
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz, const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(vector&)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>);
+ _LIBCPP_HIDE_FROM_ABI void swap(vector&);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
private:
pointer __begin_ = nullptr;
@@ -654,7 +647,7 @@ private:
// Precondition: __n > 0
// Postcondition: capacity() >= __n
// Postcondition: size() == 0
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
+ _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
if (__n > max_size())
__throw_length_error();
auto __allocation = std::__allocate_at_least(__alloc(), __n);
@@ -664,13 +657,13 @@ private:
__annotate_new(0);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vdeallocate() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const;
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void __vdeallocate() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const;
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__init_with_size(_InputIterator __first, _Sentinel __last, size_type __n) {
auto __guard = std::__make_exception_guard(__destroy_vector(*this));
@@ -683,7 +676,7 @@ private:
}
template <class _InputIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__init_with_sentinel(_InputIterator __first, _Sentinel __last) {
auto __guard = std::__make_exception_guard(__destroy_vector(*this));
@@ -694,28 +687,28 @@ private:
}
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
+ _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
template <class _ForwardIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __n);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last);
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
__insert_with_size(const_iterator __position, _Iterator __first, _Sentinel __last, difference_type __n);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI void __append(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const_reference __x);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator __make_iter(pointer __p) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iter(pointer __p) _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR
// Bound the iterator according to the capacity, rather than the size.
//
@@ -735,7 +728,7 @@ private:
#endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(const_pointer __p) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(const_pointer __p) const _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR
// Bound the iterator according to the capacity, rather than the size.
return std::__make_bounded_iter(
@@ -747,27 +740,25 @@ private:
#endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer
+ _LIBCPP_HIDE_FROM_ABI pointer
__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__move_range(pointer __from_s, pointer __from_e, pointer __to);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, false_type)
- _NOEXCEPT_(__alloc_traits::is_always_equal::value);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, true_type);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, false_type);
+ _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT {
size_type __old_size = size();
__base_destruct_at_end(__new_last);
__annotate_shrink(__old_size);
}
template <class _Up>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI inline pointer __push_back_slow_path(_Up&& __x);
+ _LIBCPP_HIDE_FROM_ABI inline pointer __push_back_slow_path(_Up&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI inline pointer __emplace_back_slow_path(_Args&&... __args);
+ _LIBCPP_HIDE_FROM_ABI inline pointer __emplace_back_slow_path(_Args&&... __args);
// The following functions are no-ops outside of AddressSanitizer mode.
// We call annotations for every allocator, unless explicitly disabled.
@@ -777,32 +768,32 @@ private:
// For more details, see the "Using libc++" documentation page or
// the documentation for __sanitizer_annotate_contiguous_container.
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__annotate_contiguous_container(const void* __old_mid, const void* __new_mid) const {
std::__annotate_contiguous_container<_Allocator>(data(), data() + capacity(), __old_mid, __new_mid);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __annotate_new(size_type __current_size) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_new(size_type __current_size) const _NOEXCEPT {
(void)__current_size;
#ifndef _LIBCPP_HAS_NO_ASAN
__annotate_contiguous_container(data() + capacity(), data() + __current_size);
#endif
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT {
#ifndef _LIBCPP_HAS_NO_ASAN
__annotate_contiguous_container(data() + size(), data() + capacity());
#endif
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __annotate_increase(size_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_increase(size_type __n) const _NOEXCEPT {
(void)__n;
#ifndef _LIBCPP_HAS_NO_ASAN
__annotate_contiguous_container(data() + size(), data() + size() + __n);
#endif
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
(void)__old_size;
#ifndef _LIBCPP_HAS_NO_ASAN
__annotate_contiguous_container(data() + __old_size, data() + size());
@@ -810,14 +801,14 @@ private:
}
struct _ConstructTransaction {
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(vector& __v, size_type __n)
+ _LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(vector& __v, size_type __n)
: __v_(__v), __pos_(__v.__end_), __new_end_(__v.__end_ + __n) {
#ifndef _LIBCPP_HAS_NO_ASAN
__v_.__annotate_increase(__n);
#endif
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
+ _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
__v_.__end_ = __pos_;
#ifndef _LIBCPP_HAS_NO_ASAN
if (__pos_ != __new_end_) {
@@ -835,43 +826,41 @@ private:
};
template <class... _Args>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_one_at_end(_Args&&... __args) {
+ _LIBCPP_HIDE_FROM_ABI void __construct_one_at_end(_Args&&... __args) {
_ConstructTransaction __tx(*this, 1);
__alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_), std::forward<_Args>(__args)...);
++__tx.__pos_;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT {
return this->__end_cap_.second();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT {
return this->__end_cap_.second();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT {
return this->__end_cap_.first();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {
return this->__end_cap_.first();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __clear() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __clear() _NOEXCEPT {
__base_destruct_at_end(this->__begin_);
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
pointer __soon_to_be_end = this->__end_;
while (__new_last != __soon_to_be_end)
__alloc_traits::destroy(__alloc(), std::__to_address(--__soon_to_be_end));
this->__end_ = __new_last;
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c) {
__copy_assign_alloc(__c, integral_constant<bool, __alloc_traits::propagate_on_container_copy_assignment::value>());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c) {
__move_assign_alloc(__c, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
}
@@ -879,7 +868,7 @@ private:
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("vector"); }
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c, true_type) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c, true_type) {
if (__alloc() != __c.__alloc()) {
__clear();
__annotate_delete();
@@ -889,21 +878,20 @@ private:
__alloc() = __c.__alloc();
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector&, false_type) {}
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector&, false_type) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c, true_type) {
__alloc() = std::move(__c.__alloc());
}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector&, false_type) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector&, false_type) _NOEXCEPT {}
};
// __swap_out_circular_buffer relocates the objects in [__begin_, __end_) into the front of __v and swaps the buffers of
// *this and __v. It is assumed that __v provides space for exactly (__end_ - __begin_) objects in the front. This
// function has a strong exception guarantee.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
+void
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v) {
__annotate_delete();
auto __new_begin = __v.__begin_ - (__end_ - __begin_);
@@ -923,7 +911,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
// exactly (__p - __begin_) objects in the front and space for at least (__end_ - __p) objects in the back. This
// function has a strong exception guarantee if __begin_ == __p || __end_ == __p.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
+typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p) {
__annotate_delete();
pointer __ret = __v.__begin_;
@@ -950,7 +938,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT {
+void vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT {
if (this->__begin_ != nullptr) {
clear();
__annotate_delete();
@@ -960,14 +948,14 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__vdeallocate() _NOE
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::size_type
+typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::max_size() const _NOEXCEPT {
return std::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<difference_type>::max());
}
// Precondition: __new_size > capacity()
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::__recommend(size_type __new_size) const {
const size_type __ms = max_size();
if (__new_size > __ms)
@@ -984,7 +972,7 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const {
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__construct_at_end(size_type __n) {
+void vector<_Tp, _Allocator>::__construct_at_end(size_type __n) {
_ConstructTransaction __tx(*this, __n);
const_pointer __new_end = __tx.__new_end_;
for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
@@ -999,7 +987,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__construct_at_end(s
// Postcondition: size() == old size() + __n
// Postcondition: [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
+inline void
vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x) {
_ConstructTransaction __tx(*this, __n);
const_pointer __new_end = __tx.__new_end_;
@@ -1010,7 +998,7 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
template <class _Tp, class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
+void
vector<_Tp, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n) {
_ConstructTransaction __tx(*this, __n);
__tx.__pos_ = std::__uninitialized_allocator_copy(__alloc(), __first, __last, __tx.__pos_);
@@ -1021,7 +1009,7 @@ vector<_Tp, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel __
// Postcondition: size() == size() + __n
// Exception safety: strong.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__append(size_type __n) {
+void vector<_Tp, _Allocator>::__append(size_type __n) {
if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
this->__construct_at_end(__n);
else {
@@ -1037,7 +1025,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__append(size_type _
// Postcondition: size() == size() + __n
// Exception safety: strong.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x) {
+void vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x) {
if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
this->__construct_at_end(__n, __x);
else {
@@ -1053,7 +1041,7 @@ template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last) {
+vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last) {
__init_with_sentinel(__first, __last);
}
@@ -1062,7 +1050,6 @@ template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
: __end_cap_(nullptr, __a) {
__init_with_sentinel(__first, __last);
@@ -1073,7 +1060,7 @@ template <class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last) {
+vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last) {
size_type __n = static_cast<size_type>(std::distance(__first, __last));
__init_with_size(__first, __last, __n);
}
@@ -1083,7 +1070,6 @@ template <class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a)
: __end_cap_(nullptr, __a) {
size_type __n = static_cast<size_type>(std::distance(__first, __last));
@@ -1091,21 +1077,19 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<_Tp, _Allocator>::vector(const vector& __x)
+vector<_Tp, _Allocator>::vector(const vector& __x)
: __end_cap_(nullptr, __alloc_traits::select_on_container_copy_construction(__x.__alloc())) {
__init_with_size(__x.__begin_, __x.__end_, __x.size());
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
: __end_cap_(nullptr, __a) {
__init_with_size(__x.__begin_, __x.__end_, __x.size());
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(vector&& __x)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(vector&& __x)
: __end_cap_(nullptr, std::move(__x.__alloc())) {
this->__begin_ = __x.__begin_;
this->__end_ = __x.__end_;
@@ -1114,7 +1098,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocato
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
: __end_cap_(nullptr, __a) {
if (__a == __x.__alloc()) {
@@ -1131,16 +1115,14 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>&
-vector<_Tp, _Allocator>::operator=(vector&& __x)
- _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
+inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>&
+vector<_Tp, _Allocator>::operator=(vector&& __x) {
__move_assign(__x, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
return *this;
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
- _NOEXCEPT_(__alloc_traits::is_always_equal::value) {
+void vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type) {
if (__alloc() != __c.__alloc()) {
typedef move_iterator<iterator> _Ip;
assign(_Ip(__c.begin()), _Ip(__c.end()));
@@ -1149,8 +1131,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__move_assign(vector
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+void vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type) {
__vdeallocate();
__move_assign_alloc(__c); // this can throw
this->__begin_ = __c.__begin_;
@@ -1160,7 +1141,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::__move_assign(vector
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>&
+inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(const vector& __x) {
if (this != std::addressof(__x)) {
__copy_assign_alloc(__x);
@@ -1174,13 +1155,13 @@ template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last) {
+void vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last) {
__assign_with_sentinel(__first, __last);
}
template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+_LIBCPP_HIDE_FROM_ABI void
vector<_Tp, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
clear();
for (; __first != __last; ++__first)
@@ -1192,13 +1173,13 @@ template <class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) {
+void vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) {
__assign_with_size(__first, __last, std::distance(__first, __last));
}
template <class _Tp, class _Allocator>
template <class _ForwardIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+_LIBCPP_HIDE_FROM_ABI void
vector<_Tp, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __n) {
size_type __new_size = static_cast<size_type>(__n);
if (__new_size <= capacity()) {
@@ -1218,7 +1199,7 @@ vector<_Tp, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u) {
+void vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u) {
if (__n <= capacity()) {
size_type __s = size();
std::fill_n(this->__begin_, std::min(__n, __s), __u);
@@ -1234,52 +1215,52 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::assign(size_type __n
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::begin() _NOEXCEPT {
return __make_iter(this->__begin_);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::begin() const _NOEXCEPT {
return __make_iter(this->__begin_);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::end() _NOEXCEPT {
return __make_iter(this->__end_);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::end() const _NOEXCEPT {
return __make_iter(this->__end_);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::reference
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < size(), "vector[] index out of bounds");
return this->__begin_[__n];
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_reference
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < size(), "vector[] index out of bounds");
return this->__begin_[__n];
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::reference vector<_Tp, _Allocator>::at(size_type __n) {
+typename vector<_Tp, _Allocator>::reference vector<_Tp, _Allocator>::at(size_type __n) {
if (__n >= size())
this->__throw_out_of_range();
return this->__begin_[__n];
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::const_reference
+typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::at(size_type __n) const {
if (__n >= size())
this->__throw_out_of_range();
@@ -1287,7 +1268,7 @@ vector<_Tp, _Allocator>::at(size_type __n) const {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::reserve(size_type __n) {
+void vector<_Tp, _Allocator>::reserve(size_type __n) {
if (__n > capacity()) {
if (__n > max_size())
this->__throw_length_error();
@@ -1298,7 +1279,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::reserve(size_type __
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT {
+void vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT {
if (capacity() > size()) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
try {
@@ -1319,7 +1300,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::shrink_to_fit() _NOE
template <class _Tp, class _Allocator>
template <class _Up>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
+typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x) {
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
@@ -1331,7 +1312,7 @@ vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
+inline _LIBCPP_HIDE_FROM_ABI void
vector<_Tp, _Allocator>::push_back(const_reference __x) {
pointer __end = this->__end_;
if (__end < this->__end_cap()) {
@@ -1344,7 +1325,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::push_back(value_type&& __x) {
+inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::push_back(value_type&& __x) {
pointer __end = this->__end_;
if (__end < this->__end_cap()) {
__construct_one_at_end(std::move(__x));
@@ -1357,7 +1338,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _All
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
+typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args) {
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
@@ -1370,7 +1351,7 @@ vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args) {
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline
+inline
void
vector<_Tp, _Allocator>::emplace_back(_Args&&... __args) {
pointer __end = this->__end_;
@@ -1384,13 +1365,13 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 inline
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void vector<_Tp, _Allocator>::pop_back() {
+inline void vector<_Tp, _Allocator>::pop_back() {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "vector::pop_back called on an empty vector");
this->__destruct_at_end(this->__end_ - 1);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __position) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__position != end(), "vector::erase(iterator) called with a non-dereferenceable iterator");
@@ -1401,7 +1382,7 @@ vector<_Tp, _Allocator>::erase(const_iterator __position) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "vector::erase(first, last) called with invalid range");
pointer __p = this->__begin_ + (__first - begin());
@@ -1412,7 +1393,7 @@ vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
+void
vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointer __to) {
pointer __old_last = this->__end_;
difference_type __n = __old_last - __to;
@@ -1427,7 +1408,7 @@ vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointe
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x) {
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap()) {
@@ -1450,7 +1431,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) {
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap()) {
@@ -1471,7 +1452,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) {
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) {
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap()) {
@@ -1492,7 +1473,7 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) {
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x) {
pointer __p = this->__begin_ + (__position - begin());
if (__n > 0) {
@@ -1526,14 +1507,14 @@ template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) {
return __insert_with_sentinel(__position, __first, __last);
}
template <class _Tp, class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
+_LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last) {
difference_type __off = __position - begin();
pointer __p = this->__begin_ + __off;
@@ -1570,14 +1551,14 @@ template <class _ForwardIterator,
__enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
+typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) {
return __insert_with_size(__position, __first, __last, std::distance(__first, __last));
}
template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
+_LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__insert_with_size(
const_iterator __position, _Iterator __first, _Sentinel __last, difference_type __n) {
auto __insertion_size = __n;
@@ -1610,7 +1591,7 @@ vector<_Tp, _Allocator>::__insert_with_size(
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::resize(size_type __sz) {
+void vector<_Tp, _Allocator>::resize(size_type __sz) {
size_type __cs = size();
if (__cs < __sz)
this->__append(__sz - __cs);
@@ -1619,7 +1600,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::resize(size_type __s
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x) {
+void vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x) {
size_type __cs = size();
if (__cs < __sz)
this->__append(__sz - __cs, __x);
@@ -1628,9 +1609,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::resize(size_type __s
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::swap(vector& __x)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
-{
+void vector<_Tp, _Allocator>::swap(vector& __x) {
_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
__alloc_traits::propagate_on_container_swap::value || this->__alloc() == __x.__alloc(),
"vector::swap: Either propagate_on_container_swap must be true"
@@ -1643,7 +1622,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::swap(vector& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 bool vector<_Tp, _Allocator>::__invariants() const {
+bool vector<_Tp, _Allocator>::__invariants() const {
if (this->__begin_ == nullptr) {
if (this->__end_ != nullptr || this->__end_cap() != nullptr)
return false;
@@ -1707,41 +1686,39 @@ public:
#endif
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type& __cap() _NOEXCEPT { return __cap_alloc_.first(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const size_type& __cap() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type& __cap() _NOEXCEPT { return __cap_alloc_.first(); }
+ _LIBCPP_HIDE_FROM_ABI const size_type& __cap() const _NOEXCEPT {
return __cap_alloc_.first();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __storage_allocator& __alloc() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI __storage_allocator& __alloc() _NOEXCEPT {
return __cap_alloc_.second();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const __storage_allocator& __alloc() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const __storage_allocator& __alloc() const _NOEXCEPT {
return __cap_alloc_.second();
}
static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static size_type
+ _LIBCPP_HIDE_FROM_ABI static size_type
__internal_cap_to_external(size_type __n) _NOEXCEPT {
return __n * __bits_per_word;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static size_type
+ _LIBCPP_HIDE_FROM_ABI static size_type
__external_cap_to_internal(size_type __n) _NOEXCEPT {
return (__n - 1) / __bits_per_word + 1;
}
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI vector();
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(const allocator_type& __a)
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a);
private:
class __destroy_vector {
public:
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}
+ _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void operator()() {
+ _LIBCPP_HIDE_FROM_ABI void operator()() {
if (__vec_.__begin_ != nullptr)
__storage_traits::deallocate(__vec_.__alloc(), __vec_.__begin_, __vec_.__cap());
}
@@ -1751,125 +1728,116 @@ private:
};
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~vector() { __destroy_vector (*this)(); }
+ _LIBCPP_HIDE_FROM_ABI ~vector() { __destroy_vector (*this)(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- vector(size_type __n, const value_type& __v, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __v, const allocator_type& __a);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v, const allocator_type& __a);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector& operator=(const vector& __v);
+ _LIBCPP_HIDE_FROM_ABI vector(const vector& __v);
+ _LIBCPP_HIDE_FROM_ABI vector(const vector& __v, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI vector& operator=(const vector& __v);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(vector&& __v)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector& operator=(vector&& __v)
- _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value);
+ _LIBCPP_HIDE_FROM_ABI vector(vector&& __v);
+ _LIBCPP_HIDE_FROM_ABI vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
+ _LIBCPP_HIDE_FROM_ABI vector& operator=(vector&& __v);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- void _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_InputIterator __first, _InputIterator __last);
+ void _LIBCPP_HIDE_FROM_ABI assign(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- void _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_ForwardIterator __first, _ForwardIterator __last);
+ void _LIBCPP_HIDE_FROM_ABI assign(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void assign(size_type __n, const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const value_type& __x);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator_type get_allocator() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT {
return allocator_type(this->__alloc());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type capacity() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_type capacity() const _NOEXCEPT {
return __internal_cap_to_external(__cap());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type size() const _NOEXCEPT { return __size_; }
- _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool empty() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __size_; }
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT {
return __size_ == 0;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin() _NOEXCEPT { return __make_iter(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator begin() const _NOEXCEPT { return __make_iter(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end() _NOEXCEPT { return __make_iter(__size_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator end() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __make_iter(0); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __make_iter(0); }
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __make_iter(__size_); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {
return __make_iter(__size_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reverse_iterator rbegin() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {
return reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator rbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {
return const_reverse_iterator(end());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reverse_iterator rend() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {
return reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator rend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {
return const_reverse_iterator(begin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator cbegin() const _NOEXCEPT { return __make_iter(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator cend() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return __make_iter(0); }
+ _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT {
return __make_iter(__size_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator crbegin() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {
return rbegin();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT { return rend(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](size_type __n) { return __make_ref(__n); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __n) const {
+ _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) { return __make_ref(__n); }
+ _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const {
return __make_ref(__n);
}
_LIBCPP_HIDE_FROM_ABI reference at(size_type __n);
_LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference front() { return __make_ref(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const { return __make_ref(0); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference back() { return __make_ref(__size_ - 1); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back() const { return __make_ref(__size_ - 1); }
+ _LIBCPP_HIDE_FROM_ABI reference front() { return __make_ref(0); }
+ _LIBCPP_HIDE_FROM_ABI const_reference front() const { return __make_ref(0); }
+ _LIBCPP_HIDE_FROM_ABI reference back() { return __make_ref(__size_ - 1); }
+ _LIBCPP_HIDE_FROM_ABI const_reference back() const { return __make_ref(__size_ - 1); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(const value_type& __x);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back() { --__size_; }
+ _LIBCPP_HIDE_FROM_ABI void push_back(const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI void pop_back() { --__size_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, const value_type& __x);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI iterator
insert(const_iterator __position, size_type __n, const value_type& __x);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
- iterator _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
+ iterator _LIBCPP_HIDE_FROM_ABI insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
- iterator _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+ iterator _LIBCPP_HIDE_FROM_ABI insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __position);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __first, const_iterator __last);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void clear() _NOEXCEPT { __size_ = 0; }
+ _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __size_ = 0; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(vector&)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void swap(reference __x, reference __y) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void swap(vector&);
+ _LIBCPP_HIDE_FROM_ABI static void swap(reference __x, reference __y) _NOEXCEPT {
std::swap(__x, __y);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __sz, value_type __x = false);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz, value_type __x = false);
+ _LIBCPP_HIDE_FROM_ABI void flip() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
private:
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const { std::__throw_length_error("vector"); }
@@ -1877,7 +1845,7 @@ private:
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("vector"); }
template <class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+ _LIBCPP_HIDE_FROM_ABI void
__init_with_size(_InputIterator __first, _Sentinel __last, size_type __n) {
auto __guard = std::__make_exception_guard(__destroy_vector(*this));
@@ -1890,7 +1858,7 @@ private:
}
template <class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+ _LIBCPP_HIDE_FROM_ABI void
__init_with_sentinel(_InputIterator __first, _Sentinel __last) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
try {
@@ -1907,18 +1875,18 @@ private:
}
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
+ _LIBCPP_HIDE_FROM_ABI void __assign_with_sentinel(_Iterator __first, _Sentinel __last);
template <class _ForwardIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ _LIBCPP_HIDE_FROM_ABI void
__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __ns);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last);
template <class _Iterator, class _Sentinel>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ _LIBCPP_HIDE_FROM_ABI iterator
__insert_with_size(const_iterator __position, _Iterator __first, _Sentinel __last, difference_type __n);
// Allocate space for __n objects
@@ -1928,7 +1896,7 @@ private:
// Precondition: __n > 0
// Postcondition: capacity() >= __n
// Postcondition: size() == 0
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vallocate(size_type __n) {
+ _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
if (__n > max_size())
__throw_length_error();
auto __allocation = std::__allocate_at_least(__alloc(), __external_cap_to_internal(__n));
@@ -1941,62 +1909,58 @@ private:
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vdeallocate() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static size_type __align_it(size_type __new_size) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __vdeallocate() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI static size_type __align_it(size_type __new_size) _NOEXCEPT {
return (__new_size + (__bits_per_word - 1)) & ~((size_type)__bits_per_word - 1);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __recommend(size_type __new_size) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_at_end(size_type __n, bool __x);
+ _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const;
+ _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, bool __x);
template <class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+ _LIBCPP_HIDE_FROM_ABI void
__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __append(size_type __n, const_reference __x);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference __make_ref(size_type __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_type __pos) _NOEXCEPT {
return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference __make_ref(size_type __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_type __pos) const _NOEXCEPT {
return __bit_const_reference<vector>(
__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator __make_iter(size_type __pos) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_type __pos) _NOEXCEPT {
return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator __make_iter(size_type __pos) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_type __pos) const _NOEXCEPT {
return const_iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT {
return begin() + (__p - cbegin());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const vector& __v) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __v) {
__copy_assign_alloc(
__v, integral_constant<bool, __storage_traits::propagate_on_container_copy_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const vector& __c, true_type) {
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c, true_type) {
if (__alloc() != __c.__alloc())
__vdeallocate();
__alloc() = __c.__alloc();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const vector&, false_type) {}
+ _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector&, false_type) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, false_type);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(vector& __c)
- _NOEXCEPT_(!__storage_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, false_type);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, true_type);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c) {
__move_assign_alloc(
__c, integral_constant<bool, __storage_traits::propagate_on_container_move_assignment::value>());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c, true_type) {
__alloc() = std::move(__c.__alloc());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(vector&, false_type) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector&, false_type) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t __hash_code() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT;
friend class __bit_reference<vector>;
friend class __bit_const_reference<vector>;
@@ -2007,7 +1971,7 @@ private:
};
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT {
+void vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT {
if (this->__begin_ != nullptr) {
__storage_traits::deallocate(this->__alloc(), this->__begin_, __cap());
this->__begin_ = nullptr;
@@ -2016,7 +1980,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__vdeallocate() _NO
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::size_type
+typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::max_size() const _NOEXCEPT {
size_type __amax = __storage_traits::max_size(__alloc());
size_type __nmax = numeric_limits<size_type>::max() / 2; // end() >= begin(), always
@@ -2027,7 +1991,7 @@ vector<bool, _Allocator>::max_size() const _NOEXCEPT {
// Precondition: __new_size > capacity()
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::size_type
+inline _LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::__recommend(size_type __new_size) const {
const size_type __ms = max_size();
if (__new_size > __ms)
@@ -2043,7 +2007,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const {
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+inline _LIBCPP_HIDE_FROM_ABI void
vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x) {
size_type __old_size = this->__size_;
this->__size_ += __n;
@@ -2058,7 +2022,7 @@ vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x) {
template <class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void
+void
vector<bool, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n) {
size_type __old_size = this->__size_;
this->__size_ += __n;
@@ -2072,18 +2036,15 @@ vector<bool, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel _
}
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
+inline _LIBCPP_HIDE_FROM_ABI vector<bool, _Allocator>::vector()
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) {}
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(const allocator_type& __a)
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
- : __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {
-}
+inline _LIBCPP_HIDE_FROM_ABI vector<bool, _Allocator>::vector(const allocator_type& __a)
+ : __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(size_type __n)
+vector<bool, _Allocator>::vector(size_type __n)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) {
if (__n > 0) {
__vallocate(__n);
@@ -2092,7 +2053,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(size_type __n)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
+vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) {
if (__n > 0) {
__vallocate(__n);
@@ -2101,7 +2062,6 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(size_type __n, co
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {
if (__n > 0) {
@@ -2112,14 +2072,13 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const all
template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last)
+vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) {
__init_with_sentinel(__first, __last);
}
template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {
__init_with_sentinel(__first, __last);
@@ -2127,7 +2086,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last)
+vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) {
auto __n = static_cast<size_type>(std::distance(__first, __last));
__init_with_size(__first, __last, __n);
@@ -2135,7 +2094,6 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(_ForwardIterator
template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {
auto __n = static_cast<size_type>(std::distance(__first, __last));
@@ -2143,7 +2101,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(const vector& __v)
+vector<bool, _Allocator>::vector(const vector& __v)
: __begin_(nullptr),
__size_(0),
__cap_alloc_(0, __storage_traits::select_on_container_copy_construction(__v.__alloc())) {
@@ -2154,7 +2112,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(const vector& __v
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
+vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __a) {
if (__v.size() > 0) {
__vallocate(__v.size());
@@ -2163,7 +2121,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(const vector& __v
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>& vector<bool, _Allocator>::operator=(const vector& __v) {
+vector<bool, _Allocator>& vector<bool, _Allocator>::operator=(const vector& __v) {
if (this != std::addressof(__v)) {
__copy_assign_alloc(__v);
if (__v.__size_) {
@@ -2179,18 +2137,14 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>& vector<bool, _Allocator>
}
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(vector&& __v)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
- : __begin_(__v.__begin_),
- __size_(__v.__size_),
- __cap_alloc_(std::move(__v.__cap_alloc_)) {
+inline _LIBCPP_HIDE_FROM_ABI vector<bool, _Allocator>::vector(vector&& __v)
+ : __begin_(__v.__begin_), __size_(__v.__size_), __cap_alloc_(std::move(__v.__cap_alloc_)) {
__v.__begin_ = nullptr;
__v.__size_ = 0;
__v.__cap() = 0;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator_type>& __a)
: __begin_(nullptr), __size_(0), __cap_alloc_(0, __a) {
if (__a == allocator_type(__v.__alloc())) {
@@ -2206,15 +2160,14 @@ vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator
}
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>&
-vector<bool, _Allocator>::operator=(vector&& __v)
- _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
+inline _LIBCPP_HIDE_FROM_ABI vector<bool, _Allocator>&
+vector<bool, _Allocator>::operator=(vector&& __v) {
__move_assign(__v, integral_constant<bool, __storage_traits::propagate_on_container_move_assignment::value>());
return *this;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__move_assign(vector& __c, false_type) {
+void vector<bool, _Allocator>::__move_assign(vector& __c, false_type) {
if (__alloc() != __c.__alloc())
assign(__c.begin(), __c.end());
else
@@ -2222,8 +2175,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__move_assign(vecto
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
+void vector<bool, _Allocator>::__move_assign(vector& __c, true_type) {
__vdeallocate();
__move_assign_alloc(__c);
this->__begin_ = __c.__begin_;
@@ -2234,7 +2186,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::__move_assign(vecto
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::assign(size_type __n, const value_type& __x) {
+void vector<bool, _Allocator>::assign(size_type __n, const value_type& __x) {
__size_ = 0;
if (__n > 0) {
size_type __c = capacity();
@@ -2252,13 +2204,13 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::assign(size_type __
template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last) {
+void vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last) {
__assign_with_sentinel(__first, __last);
}
template <class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+_LIBCPP_HIDE_FROM_ABI void
vector<bool, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
clear();
for (; __first != __last; ++__first)
@@ -2267,13 +2219,13 @@ vector<bool, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __
template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) {
+void vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) {
__assign_with_size(__first, __last, std::distance(__first, __last));
}
template <class _Allocator>
template <class _ForwardIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+_LIBCPP_HIDE_FROM_ABI void
vector<bool, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __ns) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__ns >= 0, "invalid range specified");
@@ -2290,7 +2242,7 @@ vector<bool, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::reserve(size_type __n) {
+void vector<bool, _Allocator>::reserve(size_type __n) {
if (__n > capacity()) {
if (__n > max_size())
this->__throw_length_error();
@@ -2302,7 +2254,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::reserve(size_type _
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::shrink_to_fit() _NOEXCEPT {
+void vector<bool, _Allocator>::shrink_to_fit() _NOEXCEPT {
if (__external_cap_to_internal(size()) > __cap()) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
try {
@@ -2330,7 +2282,7 @@ typename vector<bool, _Allocator>::const_reference vector<bool, _Allocator>::at(
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::push_back(const value_type& __x) {
+void vector<bool, _Allocator>::push_back(const value_type& __x) {
if (this->__size_ == this->capacity())
reserve(__recommend(this->__size_ + 1));
++this->__size_;
@@ -2338,7 +2290,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::push_back(const val
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __x) {
iterator __r;
if (size() < capacity()) {
@@ -2359,7 +2311,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x) {
iterator __r;
size_type __c = capacity();
@@ -2382,14 +2334,14 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) {
return __insert_with_sentinel(__position, __first, __last);
}
template <class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
+_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last) {
difference_type __off = __position - begin();
iterator __p = __const_iterator_cast(__position);
@@ -2423,14 +2375,14 @@ vector<bool, _Allocator>::__insert_with_sentinel(const_iterator __position, _Inp
template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) {
return __insert_with_size(__position, __first, __last, std::distance(__first, __last));
}
template <class _Allocator>
template <class _ForwardIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
+_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::__insert_with_size(
const_iterator __position, _ForwardIterator __first, _Sentinel __last, difference_type __n_signed) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__n_signed >= 0, "invalid range specified");
@@ -2455,7 +2407,7 @@ vector<bool, _Allocator>::__insert_with_size(
}
template <class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+inline _LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __position) {
iterator __r = __const_iterator_cast(__position);
std::copy(__position + 1, this->cend(), __r);
@@ -2464,7 +2416,7 @@ vector<bool, _Allocator>::erase(const_iterator __position) {
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
+typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __first, const_iterator __last) {
iterator __r = __const_iterator_cast(__first);
difference_type __d = __last - __first;
@@ -2474,9 +2426,7 @@ vector<bool, _Allocator>::erase(const_iterator __first, const_iterator __last) {
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::swap(vector& __x)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
-{
+void vector<bool, _Allocator>::swap(vector& __x) {
std::swap(this->__begin_, __x.__begin_);
std::swap(this->__size_, __x.__size_);
std::swap(this->__cap(), __x.__cap());
@@ -2485,7 +2435,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::swap(vector& __x)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::resize(size_type __sz, value_type __x) {
+void vector<bool, _Allocator>::resize(size_type __sz, value_type __x) {
size_type __cs = size();
if (__cs < __sz) {
iterator __r;
@@ -2507,7 +2457,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::resize(size_type __
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::flip() _NOEXCEPT {
+void vector<bool, _Allocator>::flip() _NOEXCEPT {
// do middle whole words
size_type __n = __size_;
__storage_pointer __p = __begin_;
@@ -2523,7 +2473,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::flip() _NOEXCEPT {
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 bool vector<bool, _Allocator>::__invariants() const {
+bool vector<bool, _Allocator>::__invariants() const {
if (this->__begin_ == nullptr) {
if (this->__size_ != 0 || this->__cap() != 0)
return false;
@@ -2537,7 +2487,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 bool vector<bool, _Allocator>::__invariants() cons
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 size_t vector<bool, _Allocator>::__hash_code() const _NOEXCEPT {
+size_t vector<bool, _Allocator>::__hash_code() const _NOEXCEPT {
size_t __h = 0;
// do middle whole words
size_type __n = __size_;
@@ -2555,14 +2505,14 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t vector<bool, _Allocator>::__hash_code() con
template <class _Allocator>
struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
: public __unary_function<vector<bool, _Allocator>, size_t> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
+ _LIBCPP_HIDE_FROM_ABI size_t
operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT {
return __vec.__hash_code();
}
};
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) {
const typename vector<_Tp, _Allocator>::size_type __sz = __x.size();
return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin());
@@ -2594,8 +2544,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const vector<_Tp, _Allocator>& __x,
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
-swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
+inline _LIBCPP_HIDE_FROM_ABI void swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y) {
__x.swap(__y);
}
More information about the llvm-branch-commits
mailing list