Eigen::Ref and const_cast

240 Views Asked by At

In C++ I can use const_cast to convert a const Eigen::VectorXd& object to an Eigen::VectorXd& one. I wonder if it's possible to do the same with Eigen::Ref objects, i.e., is there a way to convert a const Eigen::Ref<const Eigen::VectorXd>& object to an Eigen::Ref<Eigen::VectorXd>& one? If not, is there a workaround to modify an object passed as a const Eigen::Ref<const Eigen::VectorXd>&?

0

There are 0 best solutions below