Skip to content

Commit f205395

Browse files
committed
Implemented LWG3919
1 parent a103387 commit f205395

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcxx/docs/Status/Cxx2cIssues.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"`LWG4001 <https://wg21.link/LWG4001>`__","``iota_view`` should provide ``empty``","2023-11 (Kona)","|Complete|","19",""
4242
"","","","","",""
4343
"`LWG3767 <https://wg21.link/LWG3767>`__","``codecvt<charN_t, char8_t, mbstate_t>`` incorrectly added to locale","2024-03 (Tokyo)","","",""
44-
"`LWG3919 <https://wg21.link/LWG3919>`__","``enumerate_view`` may invoke UB for sized common non-forward underlying ranges","2024-03 (Tokyo)","","",""
44+
"`LWG3919 <https://wg21.link/LWG3919>`__","``enumerate_view`` may invoke UB for sized common non-forward underlying ranges","2024-03 (Tokyo)","|Complete|","21",""
4545
"`LWG3950 <https://wg21.link/LWG3950>`__","``std::basic_string_view`` comparison operators are overspecified","2024-03 (Tokyo)","|Complete|","18",""
4646
"`LWG3975 <https://wg21.link/LWG3975>`__","Specializations of ``basic_format_context`` should not be permitted","2024-03 (Tokyo)","|Nothing To Do|","",""
4747
"`LWG3984 <https://wg21.link/LWG3984>`__","``ranges::to``'s recursion branch may be ill-formed","2024-03 (Tokyo)","|Complete|","19",""

libcxx/include/__ranges/enumerate_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ class enumerate_view : public view_interface<enumerate_view<_View>> {
8484
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto end()
8585
requires(!__simple_view<_View>)
8686
{
87-
if constexpr (common_range<_View> && sized_range<_View>)
87+
if constexpr (forward_range<_View> && common_range<_View> && sized_range<_View>)
8888
return __iterator<false>(ranges::end(__base_), ranges::distance(__base_));
8989
else
9090
return __sentinel<false>(ranges::end(__base_));
9191
}
9292
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
9393
requires __range_with_movable_references<const _View>
9494
{
95-
if constexpr (common_range<const _View> && sized_range<const _View>)
95+
if constexpr (forward_range<_View> && common_range<const _View> && sized_range<const _View>)
9696
return __iterator<true>(ranges::end(__base_), ranges::distance(__base_));
9797
else
9898
return __sentinel<true>(ranges::end(__base_));

0 commit comments

Comments
 (0)