-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Because of the need to compile as valid C++, there is sometimes name mangling applied by the stanc compiler. This can affect both function names and function argument names, and I believe was the cause of epinowcast/primarycensored#258
For example:
functions {
real min(real max, real class) {
return max - class;
}
}Generates the following
// [[stan::function]]
double
_stan_min(const double& _stan_max, const double& _stan_class, std::ostream*
pstream__ = nullptr) {
return reserved_model_namespace::_stan_min(_stan_max, _stan_class,
pstream__);
}The function name could be fixed by adding the optional ("name") to the Rcpp:Export comment, but I don't think anything can be done about the argument names. Maybe cmdstanr should detect this _stan prefix and give a warning?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels