Skip to content

Commit 2370857

Browse files
committed
Add [[nodiscard]] to private functions
1 parent b631ccd commit 2370857

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/include/__ranges/join_with_view.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,28 +232,28 @@ struct join_with_view<_View, _Pattern>::__iterator
232232
}
233233
}
234234

235-
_LIBCPP_HIDE_FROM_ABI constexpr _OuterIter& __get_outer() {
235+
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr _OuterIter& __get_outer() {
236236
if constexpr (forward_range<_Base>)
237237
return __outer_it_;
238238
else
239239
return *__parent_->__outer_it_;
240240
}
241241

242-
_LIBCPP_HIDE_FROM_ABI constexpr const _OuterIter& __get_outer() const {
242+
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr const _OuterIter& __get_outer() const {
243243
if constexpr (forward_range<_Base>)
244244
return __outer_it_;
245245
else
246246
return *__parent_->__outer_it_;
247247
}
248248

249-
_LIBCPP_HIDE_FROM_ABI constexpr auto& __update_inner() {
249+
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto& __update_inner() {
250250
if constexpr (__ref_is_glvalue)
251251
return std::__as_lvalue(*__get_outer());
252252
else
253253
return __parent_->__inner_.__emplace_from([&]() -> decltype(auto) { return *__get_outer(); });
254254
}
255255

256-
_LIBCPP_HIDE_FROM_ABI constexpr auto& __get_inner() {
256+
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto& __get_inner() {
257257
if constexpr (__ref_is_glvalue)
258258
return std::__as_lvalue(*__get_outer());
259259
else
@@ -283,7 +283,7 @@ struct join_with_view<_View, _Pattern>::__iterator
283283
}
284284
}
285285

286-
static consteval auto __get_iterator_concept() noexcept {
286+
[[__nodiscard__]] static consteval auto __get_iterator_concept() noexcept {
287287
if constexpr (__ref_is_glvalue && bidirectional_range<_Base> && __bidirectional_common<_InnerBase> &&
288288
__bidirectional_common<_PatternBase>)
289289
return bidirectional_iterator_tag{};

0 commit comments

Comments
 (0)