Skip to content

Add operator[] to autovector::iterator_impl.#6047

Closed
StephanTLavavej wants to merge 1 commit intofacebook:masterfrom
StephanTLavavej:master
Closed

Add operator[] to autovector::iterator_impl.#6047
StephanTLavavej wants to merge 1 commit intofacebook:masterfrom
StephanTLavavej:master

Conversation

@StephanTLavavej
Copy link
Contributor

This is a required operator for random-access iterators, and an upcoming update for Visual Studio 2019 will change the C++ Standard Library's heap algorithms to use this operator.

This is a required operator for random-access iterators, and an
upcoming update for Visual Studio 2019 will change the
C++ Standard Library's heap algorithms to use this operator.
@facebook-github-bot
Copy link
Contributor

Hi StephanTLavavej! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@StephanTLavavej
Copy link
Contributor Author

I've filed #6048 regarding the const-overloading in this iterator (which doesn't conform to the C++ Standard's requirements and can cause problems in generic algorithms). In this PR, I have const-overloaded the operator[] for consistency with the existing code.

@siying siying self-assigned this Nov 19, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ltamasi ltamasi self-requested a review November 20, 2019 18:37
Copy link
Contributor

@ltamasi ltamasi left a comment

Choose a reason for hiding this comment

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

Thanks so much for contributing @StephanTLavavej ! We'll address the constness issues separately as part of #6048 .

@facebook-github-bot
Copy link
Contributor

@ltamasi merged this pull request in 3cd7573.

wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
Summary:
This is a required operator for random-access iterators, and an upcoming update for Visual Studio 2019 will change the C++ Standard Library's heap algorithms to use this operator.
Pull Request resolved: facebook#6047

Differential Revision: D18618531

Pulled By: ltamasi

fbshipit-source-id: 08d10bc85bf2dbc3f7ef0fa3c777e99f1e927ef5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants