@@ -64,7 +64,7 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS chunk_by_view : public view_interface
6464
6565 class __iterator ;
6666
67- _LIBCPP_HIDE_FROM_ABI constexpr iterator_t <_View> __find_next (iterator_t <_View> __current) {
67+ constexpr iterator_t <_View> __find_next (iterator_t <_View> __current) {
6868 // Note: this duplicates a check in `optional` but provides a better error message.
6969 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (
7070 __pred_.__has_value (), " Trying to call __find_next() on a chunk_by_view that does not have a valid predicate." );
@@ -75,7 +75,7 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS chunk_by_view : public view_interface
7575 ranges::adjacent_find (__current, ranges::end (__base_), __reversed_pred), 1 , ranges::end (__base_));
7676 }
7777
78- _LIBCPP_HIDE_FROM_ABI constexpr iterator_t <_View> __find_prev (iterator_t <_View> __current)
78+ constexpr iterator_t <_View> __find_prev (iterator_t <_View> __current)
7979 requires bidirectional_range<_View>
8080 {
8181 // Attempting to decrement a begin iterator is a no-op (`__find_prev` would return the same argument given to it).
@@ -93,24 +93,24 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS chunk_by_view : public view_interface
9393 }
9494
9595public:
96- _LIBCPP_HIDE_FROM_ABI chunk_by_view ()
96+ chunk_by_view ()
9797 requires default_initializable<_View> && default_initializable<_Pred>
9898 = default ;
9999
100- _LIBCPP_HIDE_FROM_ABI constexpr explicit chunk_by_view (_View __base, _Pred __pred)
100+ constexpr explicit chunk_by_view (_View __base, _Pred __pred)
101101 : __base_(std::move(__base)), __pred_(in_place, std::move(__pred)) {}
102102
103- _LIBCPP_HIDE_FROM_ABI constexpr _View base () const &
103+ constexpr _View base () const &
104104 requires copy_constructible<_View>
105105 {
106106 return __base_;
107107 }
108108
109- _LIBCPP_HIDE_FROM_ABI constexpr _View base () && { return std::move (__base_); }
109+ constexpr _View base () && { return std::move (__base_); }
110110
111- _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred () const { return *__pred_; }
111+ constexpr const _Pred& pred () const { return *__pred_; }
112112
113- _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin () {
113+ constexpr __iterator begin () {
114114 // Note: this duplicates a check in `optional` but provides a better error message.
115115 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (
116116 __pred_.__has_value (), " Trying to call begin() on a chunk_by_view that does not have a valid predicate." );
@@ -122,7 +122,7 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS chunk_by_view : public view_interface
122122 return {*this , std::move (__first), *__cached_begin_};
123123 }
124124
125- _LIBCPP_HIDE_FROM_ABI constexpr auto end () {
125+ constexpr auto end () {
126126 if constexpr (common_range<_View>) {
127127 return __iterator{*this , ranges::end (__base_), ranges::end (__base_)};
128128 } else {
@@ -143,8 +143,7 @@ class chunk_by_view<_View, _Pred>::__iterator {
143143 _LIBCPP_NO_UNIQUE_ADDRESS iterator_t <_View> __current_ = iterator_t <_View>();
144144 _LIBCPP_NO_UNIQUE_ADDRESS iterator_t <_View> __next_ = iterator_t <_View>();
145145
146- _LIBCPP_HIDE_FROM_ABI constexpr __iterator (
147- chunk_by_view& __parent, iterator_t <_View> __current, iterator_t <_View> __next)
146+ constexpr __iterator (chunk_by_view& __parent, iterator_t <_View> __current, iterator_t <_View> __next)
148147 : __parent_(std::addressof(__parent)), __current_(__current), __next_(__next) {}
149148
150149public:
@@ -153,67 +152,65 @@ class chunk_by_view<_View, _Pred>::__iterator {
153152 using iterator_category = input_iterator_tag;
154153 using iterator_concept = conditional_t <bidirectional_range<_View>, bidirectional_iterator_tag, forward_iterator_tag>;
155154
156- _LIBCPP_HIDE_FROM_ABI __iterator () = default;
155+ __iterator () = default ;
157156
158- _LIBCPP_HIDE_FROM_ABI constexpr value_type operator *() const {
157+ constexpr value_type operator *() const {
159158 // If the iterator is at end, this would return an empty range which can be checked by the calling code and doesn't
160159 // necessarily lead to a bad access.
161160 _LIBCPP_ASSERT_PEDANTIC (__current_ != __next_, " Trying to dereference past-the-end chunk_by_view iterator." );
162161 return {__current_, __next_};
163162 }
164163
165- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator ++() {
164+ constexpr __iterator& operator ++() {
166165 // Attempting to increment an end iterator is a no-op (`__find_next` would return the same argument given to it).
167166 _LIBCPP_ASSERT_PEDANTIC (__current_ != __next_, " Trying to increment past end chunk_by_view iterator." );
168167 __current_ = __next_;
169168 __next_ = __parent_->__find_next (__current_);
170169 return *this ;
171170 }
172171
173- _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator ++(int ) {
172+ constexpr __iterator operator ++(int ) {
174173 auto __tmp = *this ;
175174 ++*this ;
176175 return __tmp;
177176 }
178177
179- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator --()
178+ constexpr __iterator& operator --()
180179 requires bidirectional_range<_View>
181180 {
182181 __next_ = __current_;
183182 __current_ = __parent_->__find_prev (__next_);
184183 return *this ;
185184 }
186185
187- _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator --(int )
186+ constexpr __iterator operator --(int )
188187 requires bidirectional_range<_View>
189188 {
190189 auto __tmp = *this ;
191190 --*this ;
192191 return __tmp;
193192 }
194193
195- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator ==(const __iterator& __x, const __iterator& __y) {
194+ friend constexpr bool operator ==(const __iterator& __x, const __iterator& __y) {
196195 return __x.__current_ == __y.__current_ ;
197196 }
198197
199- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator ==(const __iterator& __x, default_sentinel_t ) {
200- return __x.__current_ == __x.__next_ ;
201- }
198+ friend constexpr bool operator ==(const __iterator& __x, default_sentinel_t ) { return __x.__current_ == __x.__next_ ; }
202199};
203200
204201namespace views {
205202namespace __chunk_by {
206203struct __fn {
207204 template <class _Range , class _Pred >
208- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator ()(_Range&& __range, _Pred&& __pred) const
205+ [[nodiscard]] constexpr auto operator ()(_Range&& __range, _Pred&& __pred) const
209206 noexcept (noexcept (/* */ chunk_by_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
210207 -> decltype(/* --*/ chunk_by_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
211208 return /* -------------*/ chunk_by_view (std::forward<_Range>(__range), std::forward<_Pred>(__pred));
212209 }
213210
214211 template <class _Pred >
215212 requires constructible_from<decay_t <_Pred>, _Pred>
216- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator ()(_Pred&& __pred) const
213+ [[nodiscard]] constexpr auto operator ()(_Pred&& __pred) const
217214 noexcept (is_nothrow_constructible_v<decay_t <_Pred>, _Pred>) {
218215 return __pipeable (std::__bind_back (*this , std::forward<_Pred>(__pred)));
219216 }
0 commit comments