Skip to content

Conversation

@strega-nil
Copy link
Contributor

@strega-nil strega-nil commented Aug 6, 2022

This is an example of what we might do; it definitely requires discussion.

In theory, with more work, fixes #2997

Based on #2991

@strega-nil strega-nil requested a review from a team as a code owner August 6, 2022 17:29
@strega-nil strega-nil changed the title Unwrappable view iterators Make filter_view::iterator unwrappable Aug 6, 2022
@strega-nil strega-nil marked this pull request as draft August 6, 2022 17:44
stl/inc/xutility Outdated
template <class _Iter>
using _Unwrapped_t = _Remove_cvref_t<decltype(_Get_unwrapped(_STD declval<_Iter>()))>;
template <class _Iter, bool _Is_unwrapped>
using _Maybe_unwrapped_t = conditional_t<_Is_unwrapped, _Unwrapped_t<_Iter>, _Remove_cvref_t<_Iter>>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse _Maybe_wrapped?

STL/stl/inc/ranges

Lines 60 to 61 in 3e046a4

template <bool _IsWrapped, class _Ty>
using _Maybe_wrapped = conditional_t<_IsWrapped, _Ty, _Unwrapped_t<_Ty>>;

still need unwrappable sentinel
@StephanTLavavej StephanTLavavej added performance Must go faster ranges C++20/23 ranges labels Aug 7, 2022
@strega-nil-ms
Copy link
Contributor

Closing for now; this requires a lot of underlying machinery to be defined, and we can do that work in algorithms.

@strega-nil-ms strega-nil-ms deleted the unwrappable-views branch December 19, 2022 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Must go faster ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Many view iterators do not contain an _Unwrapped() member function

4 participants