I am creating a library to draw samples from a bayesian model, as a backend for an R package. Thing is, MCMC algorithms tend to give a difficult time debugging. Moreover, Rcpp does not have an easy way to debug; in practice I ended up with a massive amount of "cout" statements.
The issue is when I tried to move everything to a standalone library, I realized I fell in love with Rcpp's List. Is a really neat way to store samples with different dimensions. I tried to understand Rcpp's implementation but sincerely I could not comprehend it (which is based on policies) to try to replicate it.
The question: Is there any way to implement an arbitrary sized, named tuple? (in a broad sense, not necessary using C++ tuples).
I know I could link Rcpp using the R install path, but I'm not sure if this could be a good practice or if I will have problems trying to upload the R package to CRAN (they are very strict) or using it as a standalone library for users not having R.
Thanks!