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

Simple workaround for GCC 4.4.1

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