Skip to content

Commit

Permalink
python/pickle: fix compatibility issue
Browse files Browse the repository at this point in the history
Compilation issues with recent version of Boost
  • Loading branch information
jcarpent committed Jul 27, 2021
1 parent d780648 commit 7bbc9ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bindings/python/utils/pickle-vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pinocchio
///
template<typename VecType>
struct PickleVector : boost::python::pickle_suite
{
{
static boost::python::tuple getinitargs(const VecType&)
{ return boost::python::make_tuple(); }

Expand All @@ -35,7 +35,11 @@ namespace pinocchio
{
VecType & o = boost::python::extract<VecType&>(op)();
boost::python::stl_input_iterator<typename VecType::value_type> begin(tup[0]), end;
o.insert(o.begin(),begin,end);
while(begin != end)
{
o.push_back(*begin);
++begin;
}
}
}
};
Expand Down

0 comments on commit 7bbc9ab

Please sign in to comment.