Commit 400a8d1e authored by Tiago Peixoto's avatar Tiago Peixoto

Simple workaround for GCC 4.4.1

parent 8ab0947a
......@@ -28,19 +28,20 @@ using namespace boost::lambda;
boost::any graph_tool::degree_selector(GraphInterface::deg_t deg)
{
boost::any sel;
try
GraphInterface::degree_t* d = boost::get<GraphInterface::degree_t>(&deg);
if (d != 0)
{
mpl::for_each<selectors>
(bind<void>(get_degree_selector(), _1,
boost::get<GraphInterface::degree_t>(deg),
var(sel)));
(bind<void>(get_degree_selector(), _1, *d, var(sel)));
}
catch (bad_get)
else
{
boost::any* d = boost::get<boost::any>(&deg);
bool found = false;
mpl::for_each<vertex_properties>
(bind<void>(get_scalar_selector(), _1, boost::get<boost::any>(deg),
var(sel), var(found)));
(bind<void>(get_scalar_selector(), _1, *d, var(sel), var(found)));
if (!found)
throw GraphException("invalid degree selector");
}
......
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