-
Notifications
You must be signed in to change notification settings - Fork 17k
[libc++] Implement views::join_with
#65536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
698bdd6
b631ccd
2370857
b4afb2c
7523023
5714983
6778426
3a73fac
f6f603d
e55c077
5a3996a
8b3e36c
ee942ce
56d8850
15efa6f
f267d76
3ad462c
fb5ab01
4ab1ee2
bf1eeac
3771be9
04942c0
42ce9c2
21896e9
19e4fa2
14471bc
52ad025
d52bdbf
96eae0b
0dc76bb
9760ec3
8ebaa0c
d9d0033
d3c014f
abe8ab9
4972ccc
4601812
9847c22
6a4a0a4
dfe5543
60264b0
36861f1
966b3bb
3d54775
10fdb29
30d02a1
6950e48
41b935b
a0420dc
95ea7bc
8ab29fb
7198928
6cb18ac
37525db
de46d63
fa9e257
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
_LIBCPP_NODEBUG attribute
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,16 +61,18 @@ template <input_range _View, forward_range _Pattern> | |
| requires view<_View> && input_range<range_reference_t<_View>> && view<_Pattern> && | ||
| __concatable<range_reference_t<_View>, _Pattern> | ||
| class join_with_view : public view_interface<join_with_view<_View, _Pattern>> { | ||
| using _InnerRng = range_reference_t<_View>; | ||
| using _InnerRng _LIBCPP_NODEBUG = range_reference_t<_View>; | ||
|
|
||
| _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View(); | ||
|
|
||
| static constexpr bool _UseOuterItCache = !forward_range<_View>; | ||
| using _OuterItCache = _If<_UseOuterItCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>; | ||
| using _OuterItCache _LIBCPP_NODEBUG = | ||
| _If<_UseOuterItCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>; | ||
| _LIBCPP_NO_UNIQUE_ADDRESS _OuterItCache __outer_it_; | ||
|
|
||
| static constexpr bool _UseInnerCache = !is_reference_v<_InnerRng>; | ||
| using _InnerCache = _If<_UseInnerCache, __non_propagating_cache<remove_cvref_t<_InnerRng>>, __empty_cache>; | ||
| using _InnerCache _LIBCPP_NODEBUG = | ||
| _If<_UseInnerCache, __non_propagating_cache<remove_cvref_t<_InnerRng>>, __empty_cache>; | ||
| _LIBCPP_NO_UNIQUE_ADDRESS _InnerCache __inner_; | ||
|
huixie90 marked this conversation as resolved.
|
||
|
|
||
| _LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern(); | ||
|
|
@@ -190,14 +192,14 @@ struct join_with_view<_View, _Pattern>::__iterator | |
| private: | ||
| friend join_with_view; | ||
|
|
||
| using _Parent = __maybe_const<_Const, join_with_view>; | ||
| using _Base = __maybe_const<_Const, _View>; | ||
| using _InnerBase = range_reference_t<_Base>; | ||
| using _PatternBase = __maybe_const<_Const, _Pattern>; | ||
| using _Parent _LIBCPP_NODEBUG = __maybe_const<_Const, join_with_view>; | ||
| using _Base _LIBCPP_NODEBUG = __maybe_const<_Const, _View>; | ||
| using _InnerBase _LIBCPP_NODEBUG = range_reference_t<_Base>; | ||
| using _PatternBase _LIBCPP_NODEBUG = __maybe_const<_Const, _Pattern>; | ||
|
|
||
| using _OuterIter = iterator_t<_Base>; | ||
| using _InnerIter = iterator_t<_InnerBase>; | ||
| using _PatternIter = iterator_t<_PatternBase>; | ||
| using _OuterIter _LIBCPP_NODEBUG = iterator_t<_Base>; | ||
| using _InnerIter _LIBCPP_NODEBUG = iterator_t<_InnerBase>; | ||
| using _PatternIter _LIBCPP_NODEBUG = iterator_t<_PatternBase>; | ||
|
|
||
| static_assert(!_Const || forward_range<_Base>, "Const can only be true when Base models forward_range."); | ||
|
|
||
|
|
@@ -206,7 +208,7 @@ struct join_with_view<_View, _Pattern>::__iterator | |
| _Parent* __parent_ = nullptr; | ||
|
|
||
| static constexpr bool _OuterIterPresent = forward_range<_Base>; | ||
| using _OuterIterType = _If<_OuterIterPresent, _OuterIter, std::__empty>; | ||
| using _OuterIterType _LIBCPP_NODEBUG = _If<_OuterIterPresent, _OuterIter, std::__empty>; | ||
| _LIBCPP_NO_UNIQUE_ADDRESS _OuterIterType __outer_it_ = _OuterIterType(); | ||
|
huixie90 marked this conversation as resolved.
|
||
|
|
||
| variant<_PatternIter, _InnerIter> __inner_it_; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens if the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per current standard wording, some operations are required to throw |
||
|
|
@@ -397,8 +399,8 @@ struct join_with_view<_View, _Pattern>::__sentinel { | |
| private: | ||
| friend join_with_view; | ||
|
|
||
| using _Parent = __maybe_const<_Const, join_with_view>; | ||
| using _Base = __maybe_const<_Const, _View>; | ||
| using _Parent _LIBCPP_NODEBUG = __maybe_const<_Const, join_with_view>; | ||
| using _Base _LIBCPP_NODEBUG = __maybe_const<_Const, _View>; | ||
|
|
||
| _LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>(); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.