Skip to content

Commit da8f23e

Browse files
committed
core: Fix MSVC cl build.
Break ambiguity between SetBase::project(x) and SetBase::project(x, y)
1 parent 6d29e62 commit da8f23e

File tree

1 file changed

+9
-1
lines changed
  • include/pinocchio/bindings/python/algorithm/constraints

1 file changed

+9
-1
lines changed

include/pinocchio/bindings/python/algorithm/constraints/set-base.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ namespace pinocchio
1818
{
1919
namespace bp = boost::python;
2020

21+
// Break ambiguity between SetBase::project(x) and SetBase::project(x, y)
22+
template<typename Set, typename VectorLike>
23+
static typename PINOCCHIO_EIGEN_PLAIN_TYPE(VectorLike)
24+
set_project_proxy(const Set & set, const Eigen::MatrixBase<VectorLike> & x)
25+
{
26+
return set.template project<VectorLike>(x);
27+
}
28+
2129
template<typename Set, typename VectorLike>
2230
struct SetPythonVisitor : public boost::python::def_visitor<SetPythonVisitor<Set, VectorLike>>
2331
{
@@ -32,7 +40,7 @@ namespace pinocchio
3240
},
3341
bp::args("self", "f"), "Resize the constraint given active limits.")
3442
.def(
35-
"project", &Set::template project<VectorLike>, bp::args("self", "f"),
43+
"project", set_project_proxy<Set, VectorLike>, bp::args("self", "f"),
3644
"Normal projection of a vector f onto the cone.")
3745
.def("dim", &Set::dim, "Returns the dimension of the cone.")
3846
.def("size", &Set::size, "Returns the size of the cone.")

0 commit comments

Comments
 (0)