Examples: Use modern C++ by murraycu · Pull Request #81 · boostorg/graph (original) (raw)

I don't think this class is a good idea, sorry. For starters, it's not how the library is actually used. Secondly, there must be something equivalent in Boost.Range already, presumably iterator_range.

Thirdly, and more importantly, the best thing to do would be to add begin(boost::pair)/end(boost::pair) functions to graph_traits.hpp or some other common file so that boost::pair is automatically treated as a range. If that causes problems, an alternative would be to return iterator_range instead of boost::pair.

Now, that should be done separately from this PR so that this remains entirely about updating examples.

Finally -- the reason I am suddenly interested in this, is we have now effectively dropped support for pre-C++11, so we can actually consider merging!