Commit de48ee7e authored by Philip Trettner's avatar Philip Trettner
Browse files

fixed compile errors

parent 7c086a71
......@@ -9,25 +9,25 @@
namespace polymesh
{
template <class FuncT, class... Args>
auto fbind(FuncT&& f, Args... args)
auto fbind(FuncT&& f, Args... args) -> decltype(f(std::declval<face_handle>(), std::forward<Args>(args)...))
{
return [&](face_handle h) { return f(h, std::forward<Args>(args)...); };
}
template <class FuncT, class... Args>
auto vbind(FuncT&& f, Args... args)
auto vbind(FuncT&& f, Args... args) -> decltype(f(std::declval<vertex_handle>(), std::forward<Args>(args)...))
{
return [&](vertex_handle h) { return f(h, std::forward<Args>(args)...); };
}
template <class FuncT, class... Args>
auto ebind(FuncT&& f, Args... args)
auto ebind(FuncT&& f, Args... args) -> decltype(f(std::declval<edge_handle>(), std::forward<Args>(args)...))
{
return [&](edge_handle h) { return f(h, std::forward<Args>(args)...); };
}
template <class FuncT, class... Args>
auto hbind(FuncT&& f, Args... args)
auto hbind(FuncT&& f, Args... args) -> decltype(f(std::declval<halfedge_handle>(), std::forward<Args>(args)...))
{
return [&](halfedge_handle h) { return f(h, std::forward<Args>(args)...); };
}
......
......@@ -40,21 +40,21 @@ struct bfs_range
return queue.empty() ? handle_t() : queue.front().of(mesh);
}
template <class Enabled = typename std::enable_if<std::is_same<handle_t, vertex_handle>::value>::type>
template <class handle = handle_t, class Enabled = typename std::enable_if<std::is_same<handle, vertex_handle>::value>::type>
void expand(vertex_handle v)
{
for (auto vv : v.adjacent_vertices())
if (seen.insert(vv))
queue.push(vv);
}
template <class Enabled = typename std::enable_if<std::is_same<handle_t, face_handle>::value>::type>
template <class handle = handle_t, class Enabled = typename std::enable_if<std::is_same<handle, face_handle>::value>::type>
void expand(face_handle f)
{
for (auto ff : f.adjacent_faces())
if (ff.is_valid() && seen.insert(ff))
queue.push(ff);
}
template <class Enabled = typename std::enable_if<std::is_same<handle_t, edge_handle>::value>::type>
template <class handle = handle_t, class Enabled = typename std::enable_if<std::is_same<handle, edge_handle>::value>::type>
void expand(edge_handle e)
{
for (auto ee : e.vertexA().edges())
......@@ -65,7 +65,7 @@ struct bfs_range
if (seen.insert(ee))
queue.push(ee);
}
template <class Enabled = typename std::enable_if<std::is_same<handle_t, halfedge_handle>::value>::type>
template <class handle = handle_t, class Enabled = typename std::enable_if<std::is_same<handle, halfedge_handle>::value>::type>
void expand(halfedge_handle h)
{
for (auto hh : h.vertex_to().outgoing_halfedges())
......@@ -107,4 +107,4 @@ struct bfs_iterator
bool operator!=(bfs_iterator const& rhs) const { return handle.idx != rhs.handle.idx; }
};
}
}
\ No newline at end of file
}
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