Currently, C++ entry points do not perform any error checking and simply assumes inputs are of the right type. Consider making them more robust by adding some type checking and assertion otherwise. For example,
matlab::data::ArrayType type = value_mda[0].getType();
if (type == matlab::data::ArrayType::DOUBLE)
/* do something*/
else
/* assert */