1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
--- a/include/boost/graph/graphviz.hpp
+++ b/include/boost/graph/graphviz.hpp
@@ -34,7 +34,6 @@
#include <boost/static_assert.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/xpressive/xpressive_static.hpp>
-#include <boost/foreach.hpp>
namespace boost
{
@@ -843,13 +842,13 @@ namespace detail
edge_permutation_from_sorting[temp[e]] = e;
}
typedef boost::tuple< id_t, bgl_vertex_t, id_t > v_prop;
- BOOST_FOREACH (const v_prop& t, vertex_props)
+ for (const v_prop& t : vertex_props)
{
put(boost::get< 0 >(t), dp_, boost::get< 1 >(t),
boost::get< 2 >(t));
}
typedef boost::tuple< id_t, bgl_edge_t, id_t > e_prop;
- BOOST_FOREACH (const e_prop& t, edge_props)
+ for (const e_prop& t : edge_props)
{
put(boost::get< 0 >(t), dp_,
edge_permutation_from_sorting[boost::get< 1 >(t)],
--- a/include/boost/graph/hawick_circuits.hpp
+++ b/include/boost/graph/hawick_circuits.hpp
@@ -9,7 +9,6 @@
#include <algorithm>
#include <boost/assert.hpp>
-#include <boost/foreach.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/one_bit_color_map.hpp>
#include <boost/graph/properties.hpp>
@@ -134,7 +133,7 @@ namespace hawick_circuits_detail
// documented above.
bool blocked_map_starts_all_unblocked() const
{
- BOOST_FOREACH (Vertex v, vertices(graph_))
+ for (Vertex v : vertices(graph_))
if (is_blocked(v))
return false;
return true;
@@ -144,7 +143,7 @@ namespace hawick_circuits_detail
// sharing data structures between iterations does not break the code.
bool all_closed_rows_are_empty() const
{
- BOOST_FOREACH (typename ClosedMatrix::reference row, closed_)
+ for (typename ClosedMatrix::reference row : closed_)
if (!row.empty())
return false;
return true;
--- a/src/graphml.cpp
+++ b/src/graphml.cpp
@@ -11,7 +11,6 @@
// Tiago de Paula Peixoto
#define BOOST_GRAPH_SOURCE
-#include <boost/foreach.hpp>
#include <boost/optional.hpp>
#include <boost/throw_exception.hpp>
#include <boost/graph/graphml.hpp>
@@ -44,7 +43,7 @@ public:
using boost::property_tree::ptree;
size_t current_idx = 0;
bool is_first = is_root;
- BOOST_FOREACH (const ptree::value_type& n, top)
+ for (const ptree::value_type& n : top)
{
if (n.first == "graph")
{
@@ -54,7 +53,7 @@ public:
if (is_first)
{
is_first = false;
- BOOST_FOREACH (const ptree::value_type& attr, n.second)
+ for (const ptree::value_type& attr : n.second)
{
if (attr.first != "data")
continue;
@@ -83,7 +82,7 @@ public:
| boost::property_tree::xml_parser::trim_whitespace);
ptree gml = pt.get_child(path("graphml"));
// Search for attributes
- BOOST_FOREACH (const ptree::value_type& child, gml)
+ for (const ptree::value_type& child : gml)
{
if (child.first != "key")
continue;
@@ -127,17 +126,17 @@ public:
std::vector< const ptree* > graphs;
handle_graph();
get_graphs(gml, desired_idx, true, graphs);
- BOOST_FOREACH (const ptree* gr, graphs)
+ for (const ptree* gr : graphs)
{
// Search for nodes
- BOOST_FOREACH (const ptree::value_type& node, *gr)
+ for (const ptree::value_type& node : *gr)
{
if (node.first != "node")
continue;
std::string id
= node.second.get< std::string >(path("<xmlattr>/id"));
handle_vertex(id);
- BOOST_FOREACH (const ptree::value_type& attr, node.second)
+ for (const ptree::value_type& attr : node.second)
{
if (attr.first != "data")
continue;
@@ -148,13 +147,13 @@ public:
}
}
}
- BOOST_FOREACH (const ptree* gr, graphs)
+ for (const ptree* gr : graphs)
{
bool default_directed
= gr->get< std::string >(path("<xmlattr>/edgedefault"))
== "directed";
// Search for edges
- BOOST_FOREACH (const ptree::value_type& edge, *gr)
+ for (const ptree::value_type& edge : *gr)
{
if (edge.first != "edge")
continue;
@@ -180,7 +179,7 @@ public:
}
size_t old_edges_size = m_edge.size();
handle_edge(source, target);
- BOOST_FOREACH (const ptree::value_type& attr, edge.second)
+ for (const ptree::value_type& attr : edge.second)
{
if (attr.first != "data")
continue;
|