Skip to content

<ranges>: Fix misused list-initializations - #3493

Merged
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
JMazurkiewicz:fix_ranges_lst_init
Feb 26, 2023
Merged

<ranges>: Fix misused list-initializations#3493
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
JMazurkiewicz:fix_ranges_lst_init

Conversation

@JMazurkiewicz

@JMazurkiewicz Jakub Mazurkiewicz (JMazurkiewicz) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Fixes #3014.

Library parts affected by this issue:

  • move_sentinel<S> (two constructors),
  • transform_view<R, F>::_Iterator,
  • join_view<R>::_Iterator,
  • join_with_view<R, P>::_Iterator (two constructors),
  • join_with_view<R, P>::_Sentinel
  • elements_view<R, N>::_Iterator.

@CaseyCarter Casey Carter (CaseyCarter) added bug Something isn't working ranges C++20/23 ranges labels Feb 22, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp Outdated
Comment thread tests/std/tests/P0896R4_views_elements/test.cpp Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Also thanks! I pushed a commit to delete 3 redundant lines, FYI nicole mazzuca (@strega-nil-ms).

@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks again for finding and fixing these occurrences of this bug! 🛠️ 🐞 ✨

@JMazurkiewicz
Jakub Mazurkiewicz (JMazurkiewicz) deleted the fix_ranges_lst_init branch February 26, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<ranges>: list-initialization is misused

4 participants