Skip to content

Commit ef7b5e2

Browse files
committed
Reset libcxx back a few days...
1 parent e7621f4 commit ef7b5e2

File tree

31 files changed

+2451
-2929
lines changed

31 files changed

+2451
-2929
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
set(LIBCXX_HARDENING_MODE "fast" CACHE STRING "")
2-
set(LIBCXX_ABI_DEFINES "_LIBCPP_ABI_BOUNDED_ITERATORS;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR;_LIBCPP_ABI_BOUNDED_UNIQUE_PTR" CACHE STRING "")
2+
set(LIBCXX_ABI_DEFINES "_LIBCPP_ABI_BOUNDED_ITERATORS;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR" CACHE STRING "")

libcxx/docs/Status/Cxx2cIssues.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"`LWG4013 <https://wg21.link/LWG4013>`__","``lazy_split_view::outer-iterator::value_type`` should not provide default constructor","2024-03 (Tokyo)","","",""
5151
"`LWG4016 <https://wg21.link/LWG4016>`__","container-insertable checks do not match what container-inserter does","2024-03 (Tokyo)","","",""
5252
"`LWG4023 <https://wg21.link/LWG4023>`__","Preconditions of ``std::basic_streambuf::setg/setp``","2024-03 (Tokyo)","|Complete|","19.0",""
53-
"`LWG4025 <https://wg21.link/LWG4025>`__","Move assignment operator of ``std::expected<cv void, E>`` should not be conditionally deleted","2024-03 (Tokyo)","|Complete|","20.0",""
53+
"`LWG4025 <https://wg21.link/LWG4025>`__","Move assignment operator of ``std::expected<cv void, E>`` should not be conditionally deleted","2024-03 (Tokyo)","","",""
5454
"`LWG4030 <https://wg21.link/LWG4030>`__","Clarify whether arithmetic expressions in ``[numeric.sat.func]`` are mathematical or C++","2024-03 (Tokyo)","|Nothing To Do|","",""
5555
"`LWG4031 <https://wg21.link/LWG4031>`__","``bad_expected_access<void>`` member functions should be ``noexcept``","2024-03 (Tokyo)","|Complete|","16.0",""
5656
"`LWG4035 <https://wg21.link/LWG4035>`__","``single_view`` should provide ``empty``","2024-03 (Tokyo)","|Complete|","19.0",""

libcxx/include/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set(files
2323
__algorithm/find_if.h
2424
__algorithm/find_if_not.h
2525
__algorithm/find_segment_if.h
26+
__algorithm/fold.h
2627
__algorithm/for_each.h
2728
__algorithm/for_each_n.h
2829
__algorithm/for_each_segment.h
@@ -97,7 +98,6 @@ set(files
9798
__algorithm/ranges_find_if.h
9899
__algorithm/ranges_find_if_not.h
99100
__algorithm/ranges_find_last.h
100-
__algorithm/ranges_fold.h
101101
__algorithm/ranges_for_each.h
102102
__algorithm/ranges_for_each_n.h
103103
__algorithm/ranges_generate.h
@@ -536,7 +536,6 @@ set(files
536536
__memory/allocator_arg_t.h
537537
__memory/allocator_destructor.h
538538
__memory/allocator_traits.h
539-
__memory/array_cookie.h
540539
__memory/assume_aligned.h
541540
__memory/auto_ptr.h
542541
__memory/builtin_new_allocator.h
@@ -688,6 +687,7 @@ set(files
688687
__ranges/views.h
689688
__ranges/zip_view.h
690689
__split_buffer
690+
__std_clang_module
691691
__std_mbstate_t.h
692692
__stop_token/atomic_unique_lock.h
693693
__stop_token/intrusive_list_view.h

libcxx/include/__algorithm/ranges_fold.h renamed to libcxx/include/__algorithm/fold.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
#ifndef _LIBCPP___ALGORITHM_RANGES_FOLD_H
11-
#define _LIBCPP___ALGORITHM_RANGES_FOLD_H
10+
#ifndef _LIBCPP___ALGORITHM_FOLD_H
11+
#define _LIBCPP___ALGORITHM_FOLD_H
1212

1313
#include <__concepts/assignable.h>
1414
#include <__concepts/constructible.h>
@@ -126,4 +126,4 @@ _LIBCPP_END_NAMESPACE_STD
126126

127127
_LIBCPP_POP_MACROS
128128

129-
#endif // _LIBCPP___ALGORITHM_RANGES_FOLD_H
129+
#endif // _LIBCPP___ALGORITHM_FOLD_H

libcxx/include/__config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,6 @@ typedef __char32_t char32_t;
649649
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
650650
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
651651
# endif
652-
# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
653-
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000)
654-
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
655-
# endif
656652
# elif defined(__ANDROID__) && __ANDROID_API__ < 28
657653
// Android only provides aligned_alloc when targeting API 28 or higher.
658654
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC

libcxx/include/__configuration/abi.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,6 @@
181181
# define _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING
182182
#endif
183183

184-
// Tracks the bounds of the array owned by std::unique_ptr<T[]>, allowing it to trap when accessed out-of-bounds.
185-
// Note that limited bounds checking is also available outside of this ABI configuration, but only some categories
186-
// of types can be checked.
187-
//
188-
// ABI impact: This causes the layout of std::unique_ptr<T[]> to change and its size to increase.
189-
// #define _LIBCPP_ABI_BOUNDED_UNIQUE_PTR
190-
191184
#if defined(_LIBCPP_COMPILER_CLANG_BASED)
192185
# if defined(__APPLE__)
193186
# if defined(__i386__) || defined(__x86_64__)

libcxx/include/__configuration/availability.h

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -138,31 +138,15 @@
138138
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
139139

140140
// LLVM 18
141-
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 150000) || \
142-
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 180000) || \
143-
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 180000) || \
144-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 110000) || \
145-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 90000) || \
146-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 240000)
147-
# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
148-
# else
149-
# define _LIBCPP_INTRODUCED_IN_LLVM_18 1
150-
# endif
151-
# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE \
152-
__attribute__((availability(macos, strict, introduced = 15.0))) \
153-
__attribute__((availability(ios, strict, introduced = 18.0))) \
154-
__attribute__((availability(tvos, strict, introduced = 18.0))) \
155-
__attribute__((availability(watchos, strict, introduced = 11.0))) \
156-
__attribute__((availability(bridgeos, strict, introduced = 9.0))) \
157-
__attribute__((availability(driverkit, strict, introduced = 24.0)))
141+
// TODO: Fill this in
142+
# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
143+
# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
158144

159145
// LLVM 17
160146
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140400) || \
161147
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170400) || \
162148
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170400) || \
163-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100400) || \
164-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 80400) || \
165-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 230400)
149+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100400)
166150
# define _LIBCPP_INTRODUCED_IN_LLVM_17 0
167151
# else
168152
# define _LIBCPP_INTRODUCED_IN_LLVM_17 1
@@ -171,17 +155,13 @@
171155
__attribute__((availability(macos, strict, introduced = 14.4))) \
172156
__attribute__((availability(ios, strict, introduced = 17.4))) \
173157
__attribute__((availability(tvos, strict, introduced = 17.4))) \
174-
__attribute__((availability(watchos, strict, introduced = 10.4))) \
175-
__attribute__((availability(bridgeos, strict, introduced = 8.4))) \
176-
__attribute__((availability(driverkit, strict, introduced = 23.4)))
158+
__attribute__((availability(watchos, strict, introduced = 10.4)))
177159

178160
// LLVM 16
179161
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) || \
180162
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
181163
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) || \
182-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000) || \
183-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 80000) || \
184-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 230000)
164+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
185165
# define _LIBCPP_INTRODUCED_IN_LLVM_16 0
186166
# else
187167
# define _LIBCPP_INTRODUCED_IN_LLVM_16 1
@@ -190,17 +170,13 @@
190170
__attribute__((availability(macos, strict, introduced = 14.0))) \
191171
__attribute__((availability(ios, strict, introduced = 17.0))) \
192172
__attribute__((availability(tvos, strict, introduced = 17.0))) \
193-
__attribute__((availability(watchos, strict, introduced = 10.0))) \
194-
__attribute__((availability(bridgeos, strict, introduced = 8.0))) \
195-
__attribute__((availability(driverkit, strict, introduced = 23.0)))
173+
__attribute__((availability(watchos, strict, introduced = 10.0)))
196174

197175
// LLVM 15
198176
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130400) || \
199177
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160500) || \
200178
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160500) || \
201-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500) || \
202-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 70500) || \
203-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 220400)
179+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500)
204180
# define _LIBCPP_INTRODUCED_IN_LLVM_15 0
205181
# else
206182
# define _LIBCPP_INTRODUCED_IN_LLVM_15 1
@@ -209,9 +185,7 @@
209185
__attribute__((availability(macos, strict, introduced = 13.4))) \
210186
__attribute__((availability(ios, strict, introduced = 16.5))) \
211187
__attribute__((availability(tvos, strict, introduced = 16.5))) \
212-
__attribute__((availability(watchos, strict, introduced = 9.5))) \
213-
__attribute__((availability(bridgeos, strict, introduced = 7.5))) \
214-
__attribute__((availability(driverkit, strict, introduced = 22.4)))
188+
__attribute__((availability(watchos, strict, introduced = 9.5)))
215189

216190
// LLVM 14
217191
# define _LIBCPP_INTRODUCED_IN_LLVM_14 _LIBCPP_INTRODUCED_IN_LLVM_15
@@ -221,9 +195,7 @@
221195
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130000) || \
222196
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160000) || \
223197
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160000) || \
224-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000) || \
225-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 70000) || \
226-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 220000)
198+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000)
227199
# define _LIBCPP_INTRODUCED_IN_LLVM_13 0
228200
# else
229201
# define _LIBCPP_INTRODUCED_IN_LLVM_13 1
@@ -232,17 +204,13 @@
232204
__attribute__((availability(macos, strict, introduced = 13.0))) \
233205
__attribute__((availability(ios, strict, introduced = 16.0))) \
234206
__attribute__((availability(tvos, strict, introduced = 16.0))) \
235-
__attribute__((availability(watchos, strict, introduced = 9.0))) \
236-
__attribute__((availability(bridgeos, strict, introduced = 7.0))) \
237-
__attribute__((availability(driverkit, strict, introduced = 22.0)))
207+
__attribute__((availability(watchos, strict, introduced = 9.0)))
238208

239209
// LLVM 12
240210
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120300) || \
241211
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150300) || \
242212
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150300) || \
243-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80300) || \
244-
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 60000) || \
245-
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 210300)
213+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80300)
246214
# define _LIBCPP_INTRODUCED_IN_LLVM_12 0
247215
# else
248216
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
@@ -251,9 +219,7 @@
251219
__attribute__((availability(macos, strict, introduced = 12.3))) \
252220
__attribute__((availability(ios, strict, introduced = 15.3))) \
253221
__attribute__((availability(tvos, strict, introduced = 15.3))) \
254-
__attribute__((availability(watchos, strict, introduced = 8.3))) \
255-
__attribute__((availability(bridgeos, strict, introduced = 6.0))) \
256-
__attribute__((availability(driverkit, strict, introduced = 21.3)))
222+
__attribute__((availability(watchos, strict, introduced = 8.3)))
257223

258224
// LLVM 11
259225
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \

libcxx/include/__expected/expected.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,8 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
14931493
return *this;
14941494
}
14951495

1496+
_LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(expected&&) = delete;
1497+
14961498
_LIBCPP_HIDE_FROM_ABI constexpr expected&
14971499
operator=(expected&& __rhs) noexcept(is_nothrow_move_assignable_v<_Err> && is_nothrow_move_constructible_v<_Err>)
14981500
requires(is_move_assignable_v<_Err> && is_move_constructible_v<_Err>)

libcxx/include/__format/formatter_integral.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <__type_traits/make_unsigned.h>
2828
#include <__utility/unreachable.h>
2929
#include <array>
30-
#include <cstdint>
3130
#include <limits>
3231
#include <string>
3332
#include <string_view>

libcxx/include/__iterator/next.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_LIBCPP_BEGIN_NAMESPACE_STD
2626

2727
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
28-
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
28+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
2929
next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
3030
// Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
3131
// Note that this check duplicates the similar check in `std::advance`.
@@ -43,26 +43,25 @@ next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n =
4343
namespace ranges {
4444
struct __next {
4545
template <input_or_output_iterator _Ip>
46-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
46+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
4747
++__x;
4848
return __x;
4949
}
5050

5151
template <input_or_output_iterator _Ip>
52-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
52+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
5353
ranges::advance(__x, __n);
5454
return __x;
5555
}
5656

5757
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
58-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
58+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
5959
ranges::advance(__x, __bound_sentinel);
6060
return __x;
6161
}
6262

6363
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
64-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip
65-
operator()(_Ip __x, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
64+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
6665
ranges::advance(__x, __n, __bound_sentinel);
6766
return __x;
6867
}

libcxx/include/__iterator/prev.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_LIBCPP_BEGIN_NAMESPACE_STD
2626

2727
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
28-
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
28+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
2929
prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
3030
// Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
3131
// Note that this check duplicates the similar check in `std::advance`.
@@ -42,20 +42,19 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n =
4242
namespace ranges {
4343
struct __prev {
4444
template <bidirectional_iterator _Ip>
45-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
45+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
4646
--__x;
4747
return __x;
4848
}
4949

5050
template <bidirectional_iterator _Ip>
51-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
51+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
5252
ranges::advance(__x, -__n);
5353
return __x;
5454
}
5555

5656
template <bidirectional_iterator _Ip>
57-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip
58-
operator()(_Ip __x, iter_difference_t<_Ip> __n, _Ip __bound_iter) const {
57+
_LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Ip __bound_iter) const {
5958
ranges::advance(__x, -__n, __bound_iter);
6059
return __x;
6160
}

0 commit comments

Comments
 (0)