Skip to content

Implement ranges::replace_if - #984

Merged
Casey Carter (CaseyCarter) merged 4 commits into
microsoft:masterfrom
miscco:ranges_replace_if
Jul 7, 2020
Merged

Casey Carter (CaseyCarter) merged 4 commits into
microsoft:masterfrom
miscco:ranges_replace_if

Conversation

@miscco

Copy link
Copy Markdown
Contributor

This replaces the ranges::replace_if algorithm

Comment thread stl/inc/algorithm Outdated
Comment thread stl/inc/algorithm Outdated
Comment thread stl/inc/algorithm
Comment on lines +3068 to +3069
_It _First, const _Se _Last, _Pr _Pred, const _Ty& _Newval, _Pj _Proj) {
// replace projected _Oldval that fulfills _Pred with _Newval in [_First, _Last)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I observe that there is no variable named _Oldval in this function - but this isn't confusing, so it's not worth changing to "value". No change requested.

@CaseyCarter
Casey Carter (CaseyCarter) merged commit aac7b3f into microsoft:master Jul 7, 2020
@CaseyCarter

Copy link
Copy Markdown
Contributor

Congratulations on your first Range algorithm contribution. (Your STL bingo card must be filling up.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants