Examples: Use modern C++
These commits change the code in examples/ to use modern C++, specifically C++11. For instance, to use auto to avoid the verbosity of the traits and typedefs.
Even if we don't want to require C++11 for the API itself, maybe it's OK to use it for the example code, to more clearly demonstrate the API. I would understand if you don't want this.
The last commit ("Add and use make_range_pair") is even more debatable: It uses a range_pair utility class to allow use of range-based for loops, but maybe this should actually be a change to the API, or maybe it's something that will be better one day with C++ ranges in C++20.
I'm currently disinclined to apply this PR though I do appreciate your efforts Murray.
I would love to see Boost.Graph get a modernization, I would actually vote for C++14 at this point. Since Boost.Graph is not depended on by other libraries in Boost but it has been around for a long time, what would it take for a modernization to be accepted?
@Belcourt why are (were) you disinclined? You rejected the PR but gave no reason for the submitter to allow for more improvement.
I'm helping out with the PR backlog. Looks like you have a large code change. I would like to merge this in around v1.69. The modernization is greatly appreciated, but making some fixes available and then having this change at a later version. There is a very long mailing thread where it looks like the latest when C++03 support will be thought about is 2020, but I'm comfortable telling people now that they should be using a newer system. This can affect other PRs, so lets hold off on merging everything now. This is to let you know and help me prioritize PR's.
Should we actually make this a branch for devel-cpp17?
I'm helping out with the PR backlog. Looks like you have a large code change. I would like to merge this in around v1.69. The modernization is greatly appreciated, but making some fixes available and then having this change at a later version. [snip]
@anadon That's encouraging. Thanks. I don't quite understand what you'd like to do and when. Please feel free to request changes or updates from me that would help you to get this merged into the real code base.
@murraycu Can you please rebase this PR on upstream's devel branch?
OK. I've rebased on master and force pushed to the develop-murrayc-examples-modern-cpp branch in my fork.
I can't seem to remember how I built this at the time, inside modular-boost, so it might not actually build now.
@murraycu Looks like there are some CI failures. Could you please take a look at those?
2 failures are in the code changes, 2 are from external parameter parsing. Shouldn't be that bad to fix.
At the moment I can't even build the regular develop branch:
[murrayc@murrayc-ThinkPad-X220 boost (develop *)]$ ./b2
Performing configuration checks
- default address-model : 64-bit
- default architecture : x86
Building the Boost C++ Libraries.
- symlinks supported : yes
error: at /home/murrayc/checkout/github/boost/tools/build/src/kernel/modules.jam:107
error: Cannot create link boost/pending/property_serialize.hpp to libs/graph/include/boost/pending/property_serialize.hpp.
error: Link previously defined to another file, libs/graph_parallel/include/boost/pending/property_serialize.hpp.
The remaining build errors in CI are in tests/isomorphism.cpp, and seem to be unrelated to my changes.
I've been out a while, but I think an external dependency changes and all of graph broke. I'd lets things settle while graph gets fixed back up.
On Thu, Nov 29, 2018 at 2:52 PM Murray Cumming [email protected] wrote:
The remaining build errors in CI are in tests/isomorphism.cpp, and seem to be unrelated to my changes.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boostorg/graph/pull/81#issuecomment-442970439, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-CBbJV6rHErOodtiziho7-JN2SmtcUks5u0DsEgaJpZM4KnIyE .