diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c9c7f9b5..cf2e99fbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,16 +25,13 @@ target_link_libraries(boost_graph Boost::concept_check Boost::config Boost::container_hash - Boost::conversion Boost::core Boost::detail - Boost::foreach Boost::function Boost::integer Boost::iterator Boost::lexical_cast Boost::math - Boost::move Boost::mpl Boost::multi_index Boost::multiprecision @@ -52,7 +49,6 @@ target_link_libraries(boost_graph Boost::tti Boost::tuple Boost::type_traits - Boost::typeof Boost::unordered Boost::utility Boost::xpressive diff --git a/build.jam b/build.jam index af9f24242..c8f1b19af 100644 --- a/build.jam +++ b/build.jam @@ -11,20 +11,16 @@ constant boost_dependencies : /boost/array//boost_array /boost/assert//boost_assert /boost/bimap//boost_bimap - /boost/bind//boost_bind /boost/concept_check//boost_concept_check /boost/config//boost_config /boost/container_hash//boost_container_hash - /boost/conversion//boost_conversion /boost/core//boost_core /boost/detail//boost_detail - /boost/foreach//boost_foreach /boost/function//boost_function /boost/integer//boost_integer /boost/iterator//boost_iterator /boost/lexical_cast//boost_lexical_cast /boost/math//boost_math_tr1 - /boost/move//boost_move /boost/mpl//boost_mpl /boost/multi_index//boost_multi_index /boost/multiprecision//boost_multiprecision @@ -42,7 +38,6 @@ constant boost_dependencies : /boost/tti//boost_tti /boost/tuple//boost_tuple /boost/type_traits//boost_type_traits - /boost/typeof//boost_typeof /boost/unordered//boost_unordered /boost/utility//boost_utility /boost/xpressive//boost_xpressive ; diff --git a/include/boost/graph/buffer_concepts.hpp b/include/boost/graph/buffer_concepts.hpp index 1eb48abcf..11bfc39c8 100644 --- a/include/boost/graph/buffer_concepts.hpp +++ b/include/boost/graph/buffer_concepts.hpp @@ -7,7 +7,6 @@ #define BOOST_GRAPH_BUFFER_CONCEPTS_HPP 1 #include #include -#include #include #include #include diff --git a/include/boost/graph/depth_first_search.hpp b/include/boost/graph/depth_first_search.hpp index 17d25e89c..b42666cab 100644 --- a/include/boost/graph/depth_first_search.hpp +++ b/include/boost/graph/depth_first_search.hpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -275,7 +274,7 @@ void depth_first_search(const VertexListGraph& g, DFSVisitor vis, typename graph_traits< VertexListGraph >::vertex_iterator ui, ui_end; for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { - Vertex u = implicit_cast< Vertex >(*ui); + Vertex u = *ui; put(color, u, Color::white()); vis.initialize_vertex(u, g); } @@ -289,7 +288,7 @@ void depth_first_search(const VertexListGraph& g, DFSVisitor vis, for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { - Vertex u = implicit_cast< Vertex >(*ui); + Vertex u = *ui; ColorValue u_color = get(color, u); if (u_color == Color::white()) { diff --git a/include/boost/graph/graphviz.hpp b/include/boost/graph/graphviz.hpp index 4b7bd00c5..62e58cde3 100644 --- a/include/boost/graph/graphviz.hpp +++ b/include/boost/graph/graphviz.hpp @@ -34,7 +34,6 @@ #include #include #include -#include 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)], diff --git a/include/boost/graph/hawick_circuits.hpp b/include/boost/graph/hawick_circuits.hpp index cefd6a13a..85a158bcf 100644 --- a/include/boost/graph/hawick_circuits.hpp +++ b/include/boost/graph/hawick_circuits.hpp @@ -9,15 +9,14 @@ #include #include -#include #include #include #include -#include #include #include #include #include +#include #include // for boost::tie #include #include @@ -48,11 +47,11 @@ namespace hawick_circuits_detail template < typename Vertex, typename Graph > typename result< get_all_adjacent_vertices( - BOOST_FWD_REF(Vertex), BOOST_FWD_REF(Graph)) >::type - operator()(BOOST_FWD_REF(Vertex) v, BOOST_FWD_REF(Graph) g) const + Vertex&&, Graph&&) >::type + operator()(Vertex&& v, Graph&& g) const { return adjacent_vertices( - boost::forward< Vertex >(v), boost::forward< Graph >(g)); + std::forward< Vertex >(v), std::forward< Graph >(g)); } }; @@ -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 : boost::make_iterator_range(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; @@ -347,34 +346,34 @@ namespace hawick_circuits_detail template < typename GetAdjacentVertices, typename Graph, typename Visitor > void call_hawick_circuits( - Graph const& graph, BOOST_FWD_REF(Visitor) visitor, + Graph const& graph, Visitor&& visitor, unsigned int max_length) { call_hawick_circuits< GetAdjacentVertices >(graph, - boost::forward< Visitor >(visitor), get(vertex_index, graph), + std::forward< Visitor >(visitor), get(vertex_index, graph), max_length); } } // end namespace hawick_circuits_detail //! Enumerate all the elementary circuits in a directed multigraph. template < typename Graph, typename Visitor, typename VertexIndexMap > -void hawick_circuits(BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor, - BOOST_FWD_REF(VertexIndexMap) vertex_index_map, +void hawick_circuits(Graph&& graph, Visitor&& visitor, + VertexIndexMap&& vertex_index_map, unsigned int max_length = 0) { hawick_circuits_detail::call_hawick_circuits< hawick_circuits_detail::get_all_adjacent_vertices >( - boost::forward< Graph >(graph), boost::forward< Visitor >(visitor), - boost::forward< VertexIndexMap >(vertex_index_map), max_length); + std::forward< Graph >(graph), std::forward< Visitor >(visitor), + std::forward< VertexIndexMap >(vertex_index_map), max_length); } template < typename Graph, typename Visitor > -void hawick_circuits(BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor, +void hawick_circuits(Graph&& graph, Visitor&& visitor, unsigned int max_length = 0) { hawick_circuits_detail::call_hawick_circuits< hawick_circuits_detail::get_all_adjacent_vertices >( - boost::forward< Graph >(graph), boost::forward< Visitor >(visitor), + std::forward< Graph >(graph), std::forward< Visitor >(visitor), max_length); } @@ -383,25 +382,25 @@ void hawick_circuits(BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor, * edges will not be considered. Each circuit will be considered only once. */ template < typename Graph, typename Visitor, typename VertexIndexMap > -void hawick_unique_circuits(BOOST_FWD_REF(Graph) graph, - BOOST_FWD_REF(Visitor) visitor, - BOOST_FWD_REF(VertexIndexMap) vertex_index_map, +void hawick_unique_circuits(Graph&& graph, + Visitor&& visitor, + VertexIndexMap&& vertex_index_map, unsigned int max_length = 0) { hawick_circuits_detail::call_hawick_circuits< hawick_circuits_detail::get_unique_adjacent_vertices >( - boost::forward< Graph >(graph), boost::forward< Visitor >(visitor), - boost::forward< VertexIndexMap >(vertex_index_map), max_length); + std::forward< Graph >(graph), std::forward< Visitor >(visitor), + std::forward< VertexIndexMap >(vertex_index_map), max_length); } template < typename Graph, typename Visitor > void hawick_unique_circuits( - BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor, + Graph&& graph, Visitor&& visitor, unsigned int max_length = 0) { hawick_circuits_detail::call_hawick_circuits< hawick_circuits_detail::get_unique_adjacent_vertices >( - boost::forward< Graph >(graph), boost::forward< Visitor >(visitor), + std::forward< Graph >(graph), std::forward< Visitor >(visitor), max_length); } } // end namespace boost diff --git a/include/boost/graph/is_straight_line_drawing.hpp b/include/boost/graph/is_straight_line_drawing.hpp index 49b522f7f..d88951062 100644 --- a/include/boost/graph/is_straight_line_drawing.hpp +++ b/include/boost/graph/is_straight_line_drawing.hpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/src/graphml.cpp b/src/graphml.cpp index af930fad9..2f30284fe 100644 --- a/src/graphml.cpp +++ b/src/graphml.cpp @@ -11,7 +11,6 @@ // Tiago de Paula Peixoto #define BOOST_GRAPH_SOURCE -#include #include #include #include @@ -44,7 +43,7 @@ class graphml_reader 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 @@ class graphml_reader 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 @@ class graphml_reader | 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 @@ class graphml_reader 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("/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 @@ class graphml_reader } } } - BOOST_FOREACH (const ptree* gr, graphs) + for (const ptree* gr : graphs) { bool default_directed = gr->get< std::string >(path("/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 @@ class graphml_reader } 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;