stanc3
stanc3 copied to clipboard
[FR] Variadic signatures with external c++
Currently the only way to specify/use a variadic signature in Stan is by adding it to stanc3, but it would be great for prototyping if it was possible to specify a variadic signature for an external c++ function.
In other words, for the forward declaration:
functions {
real testing(real x, ...);
}
To transpile to something like:
template <typename T, typename... TArgs, require_stan_scalar_t<T>* = nullptr>
T testing(const T& x, const TArgs&... args);
This would be a bit tricky to implement I think. What use case do you have in mind?