Commit 9bd68ef9 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix compilation issues with GCC 8

parent 91b8743c
......@@ -58,7 +58,7 @@ struct prop_vector
any_cast<Property>(props[i]).get_unchecked(size);
prop_vec = vec;
}
catch (bad_any_cast){}
catch (bad_any_cast&){}
}
}
};
......
......@@ -247,7 +247,7 @@ struct Converter
{
val_name = lexical_cast<string>(v);
}
catch (bad_lexical_cast)
catch (bad_lexical_cast&)
{
val_name = "<no lexical cast available>";
}
......
......@@ -197,7 +197,6 @@ inline void operator/=(vector<T1>& v1, const vector<T2>& v2)
v1.resize(max(v1.size(), v2.size()));
for (size_t i = 0; i < v2.size(); ++i)
v1[i] /= v2[i];
return v1;
}
template <class T1, class T2>
......
......@@ -386,7 +386,7 @@ struct get_str
sval = "\"" + sval + "\"";
}
}
catch (bad_any_cast)
catch (bad_any_cast&)
{
}
}
......
......@@ -218,7 +218,7 @@ struct check_value_type
_map = new boost::detail::dynamic_property_map_adaptor<map_t>
(vector_map);
}
catch (bad_any_cast) {}
catch (bad_any_cast&) {}
}
IndexMap _index_map;
const key_t& _key;
......@@ -249,7 +249,7 @@ struct create_dynamic_map
any_cast<vertex_t>(key),
value, map));
}
catch (bad_any_cast)
catch (bad_any_cast&)
{
try
{
......@@ -258,7 +258,7 @@ struct create_dynamic_map
any_cast<edge_t>(key),
value, map));
}
catch (bad_any_cast)
catch (bad_any_cast&)
{
ConstantPropertyMap<size_t,graph_property_tag> graph_index(0);
boost::mpl::for_each<value_types>
......
......@@ -44,7 +44,7 @@ struct copy_property
auto src_map = boost::any_cast<typename PropertyTgt::checked_t>(prop_src);
dispatch(tgt, src, dst_map, src_map);
}
catch (boost::bad_any_cast)
catch (boost::bad_any_cast&)
{
typedef typename boost::property_traits<PropertyTgt>::value_type val_tgt;
typedef typename IteratorSel::template get_descriptor<GraphSrc>::type src_d;
......
......@@ -273,14 +273,6 @@ target(const typename reversed_graph<BidirectionalGraph,GRef>::edge_descriptor&
return source(e, g._g);
}
template <class BidirectionalGraph, class GRef>
inline
typename graph_traits<reversed_graph<BidirectionalGraph,GRef>>::vertex_descriptor
vertex(size_t i, const reversed_graph<BidirectionalGraph,GRef>& g)
{
return vertex(i, g._g);
}
template <class BidirectionalGraph, class GRef>
inline std::pair<typename reversed_graph<BidirectionalGraph,GRef>::out_edge_iterator,
typename reversed_graph<BidirectionalGraph,GRef>::out_edge_iterator>
......
......@@ -258,7 +258,7 @@ struct StateWrap
T val = any_cast<T>(aval);
return val;
}
catch (boost::bad_any_cast)
catch (boost::bad_any_cast&)
{
try
{
......@@ -269,7 +269,7 @@ struct StateWrap
auto val = any_cast<ref_wrap_t>(aval);
return val.get();
}
catch (boost::bad_any_cast)
catch (boost::bad_any_cast&)
{
throw ValueException("Cannot extract parameter '" + name +
"' of desired type: " +
......
......@@ -110,6 +110,7 @@ struct do_all_pairs_search_unweighted
void operator()(const Graph& g, DistMap dist_map) const
{
typedef typename graph_traits<Graph>::vertex_descriptor vertex_t;
typedef typename property_traits<DistMap>::value_type dist_t;
vector<vertex_t> pred_map(num_vertices(g));
#pragma omp parallel if (num_vertices(g) > OPENMP_MIN_THRESH) \
......@@ -119,8 +120,7 @@ struct do_all_pairs_search_unweighted
[&](auto v)
{
dist_map[v].resize(num_vertices(g), 0);
bfs_visitor<typename std::remove_reference<decltype(dist_map[v])>::type,
vector<size_t>>
bfs_visitor<dist_t,vector<size_t>>
vis(dist_map[v], pred_map, v);
breadth_first_search(g, v, visitor(vis));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment