Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Oct 29, 2020

We currently have const-qualified member functions that attempt to move from member variables, which is at the very least confusing. This change splits the operator() const of views::filter and views::transform's corresponding range adaptor closure objects into const&-qualified and &&-qualified overloads that copy and move from, respectively, the stashed function object.

We currently have `const`-qualified member functions that attempt to move from member variables, which is at the very least confusing. This change splits the `operator() const` of `views::filter` and `views::transform`'s correspondng range adaptor closure objects into `const&`-qualified and `&&`-qualified overloads that copy and move from, respectively, the stashed function object.
@CaseyCarter CaseyCarter added performance Must go faster ranges C++20/23 ranges labels Oct 29, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner October 29, 2020 01:06
StephanTLavavej added a commit to StephanTLavavej/STL that referenced this pull request Nov 5, 2020
@StephanTLavavej StephanTLavavej self-assigned this Nov 5, 2020
StephanTLavavej added a commit to StephanTLavavej/STL that referenced this pull request Nov 5, 2020
@StephanTLavavej StephanTLavavej merged commit 537863a into microsoft:master Nov 7, 2020
@StephanTLavavej
Copy link
Member

Thanks for this cleanup and/or potential performance improvement! 🧹 🚀

@CaseyCarter CaseyCarter deleted the closure-fix branch November 9, 2020 20:22
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.

3 participants