Subject: [Boost-bugs] [Boost C++ Libraries] #7035: pair<iterator, iterator>, tie, and Boost.Range co-operate poorly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-27 10:41:17
#7035: pair<iterator, iterator>, tie, and Boost.Range co-operate poorly
-------------------------------------------------+--------------------------
Reporter: philipp.moeller@⦠| Owner: jewillco
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
-------------------------------------------------+--------------------------
Boost.Graph returns ''std::pair<iterator, iterator>'' for all
ranges. This works nicely with the common:
{{{#!cpp
iterator begin, end;
for(tie(begin, end) = vertices(graph); begin != end; ++begin) {}
}}}
or Boost.Range algorithms.
When adapting new graphs it is often more convenient to return an
''iterator_range'' and work with it, but this doesn't support the
''tie' idiom anymore and breaks a lot of code in Boost.Graph.
Unifying this would be a nice-to-have feature.
I see two options for this: Either at support for ''tie'' to Range or
transition Graph towards Range algorithms. The first seems much easier
to do, but is also a less clean solution because it somewhat muddies
Range conceptually.
On the other hand it is not clear to me how much Range is going to
change with standardization and what version, if any, will end up in
the next standard.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7035> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC