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

Replace Boost::foreach dependency with range-based for #409

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

georgthegreat
Copy link

@georgthegreat georgthegreat commented Dec 21, 2024

The library is marked as C++14, hence it should be safe to replace the dependency with native syntax.

boost::graph::vertices returns std::pair which is not compatible with range-based for.
As changing this behavior would result in API break, only public part was changed and the dependency still remains.

@jeremy-murphy jeremy-murphy self-assigned this Dec 21, 2024
@jeremy-murphy
Copy link
Contributor

Thanks!

@jeremy-murphy
Copy link
Contributor

If there are any build failures, please investigate.

@georgthegreat
Copy link
Author

@jeremy-murphy, I had to reduce the amount of changes as it turns out that range-based-for is incompatible with vertices() method (it returns std::pair which is not a range in c++ terms, yet is accepted by BOOST_FOREACH).

So, publicpart is rewritten and boost/foreach is no longer included from neither include/ nor src/ directories.

Can we merge such (partial) improvement?

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