Skip to content

Commit 68976ba

Browse files
committed
view: clarify helper func of end()
1 parent 422d941 commit 68976ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcxx/include/__ranges/cartesian_product_view.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ class cartesian_product_view : public view_interface<cartesian_product_view<Firs
143143
return it;
144144
}
145145

146-
template <auto N = 0>
146+
template <auto N = 1>
147147
constexpr bool end_is_empty() const {
148-
if constexpr (N == sizeof...(Vs))
148+
if constexpr (N == 1 + sizeof...(Vs))
149149
return false;
150-
if (const auto& v = std::get<N + 1>(bases_); ranges::empty(v))
150+
if (const auto& v = std::get<N>(bases_); ranges::empty(v))
151151
return true;
152152
return end_is_empty<N + 1>();
153153
}

0 commit comments

Comments
 (0)