Open
Description
Explicit template instantiation C++ library use a context file that define the custom scalar to be used.
This custom scalar is a globally defined, and then, it's impossible to have the explicit template instantiation defined for two custom scalar type in the same C++ file.
By example the following code will be able to use explicit template instantiation for double but not for cppad:
#include "pinocchio/autodiff/cppad.hpp"
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/multibody/data.hpp"
#include "pinocchio/multibody/sample-models.hpp"
typedef pinocchio::ModelTpl<CppAD::AD<double>> ADModel;
typedef pinocchio::DataTpl<CppAD::AD<double>> ADData;
int main()
{
pinocchio::Model model;
pinocchio::buildModels::manipulator(model);
pinocchio::Data data(model);
ADModel ad_model = model.cast<CppAD::AD<double>>();
ADData ad_data(ad_model);
}
We should find another way to declare explicit template instantiation that allow to declare it to multiple scalar type.
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog