Skip to content

Fix iterator on empty map#8

Open
Dllieu wants to merge 1 commit intoskarupke:masterfrom
Dllieu:master
Open

Fix iterator on empty map#8
Dllieu wants to merge 1 commit intoskarupke:masterfrom
Dllieu:master

Conversation

@Dllieu
Copy link
Copy Markdown

@Dllieu Dllieu commented Oct 17, 2017

No description provided.

@smessmer
Copy link
Copy Markdown

smessmer commented Feb 7, 2019

This is actually unreachable code since the loop never exits if it doesn't call its return. Not saying I have a good understanding of if the current version of the code handles empty maps correctly or not though. My guess would be a sentinel element that ensures it always finds an element that has has_value()==true and returns?

facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request Feb 11, 2019
Summary:
Pull Request resolved: #16907

The begin()/end() fix actually doesn't make sense, see my comment on skarupke/flat_hash_map#8
This diff removes it.

Reviewed By: ezyang

Differential Revision: D13985779

fbshipit-source-id: f08b02c941069e2a4e728e02a19b65dc72f96b41
pearu pushed a commit to Quansight/pytorch that referenced this pull request Feb 12, 2019
Summary:
Pull Request resolved: pytorch#16907

The begin()/end() fix actually doesn't make sense, see my comment on skarupke/flat_hash_map#8
This diff removes it.

Reviewed By: ezyang

Differential Revision: D13985779

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants