Skip to content
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

Use range-based for loops with boost::filesystem::directory_iterator #3432

Conversation

SunBlack
Copy link
Contributor

Don't really know how bf::directory_iterator be an iterator and return at same time an object which has a begin() and end() method, but documentation says for-ranged loops can be used there.

Just to mention: Didn't found matching rst-files for adjusted tutorials.

@kunaltyagi kunaltyagi changed the title Use for-ranged loop for bf::directory_iterator Use for-ranged loop for boost::filesystem::directory_iterator Oct 22, 2019
@kunaltyagi
Copy link
Member

be an iterator and return at same time an object which has a begin() and end() method

It has a bad name (interface?). It acts like a directory_view (like string_view) but also has the interface (state, de-reference and equality) of directory_iterator.

Copy link
Member

@kunaltyagi kunaltyagi left a comment

Choose a reason for hiding this comment

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

LGTM depends on pending CI (not Ubuntu) now

@SergioRAgostinho SergioRAgostinho merged commit d460aa3 into PointCloudLibrary:master Oct 22, 2019
@SunBlack SunBlack deleted the directory_iterator_for-ranged_loop branch October 22, 2019 09:25
@taketwo taketwo changed the title Use for-ranged loop for boost::filesystem::directory_iterator Use range-based for loops with boost::filesystem::directory_iterator Jan 14, 2020
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