Align cmdstan and rstan auto-generated code?

Ok. I will raise it. Essentially the major difference is that rstan puts the include inside the model namespace whereas cmdstan puts it external to the model namespace at the very end of the C++ file.

I have for myself worked around the issue by instructing rstan to include the string

}
#include "custom.hpp"
namespace model_ns {

Doing so make my custom.hpp show up in the same context in rstan and in cmdstan compiled models (and I can use the same custom.hpp for both interfaces).

This works, but it feels like an ugly hack.

Sebastian