stanc3 icon indicating copy to clipboard operation
stanc3 copied to clipboard

[FR] Variadic signatures with external c++

Open andrjohns opened this issue 2 years ago • 1 comments

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);

andrjohns avatar Aug 17 '23 05:08 andrjohns

This would be a bit tricky to implement I think. What use case do you have in mind?

WardBrian avatar Aug 17 '23 12:08 WardBrian