-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstreaming std::tuple<>
support
#1278
Comments
Howdy and thanks for suggesting that. We will take a look. It may otherwise be easiest to do this in a small add-on package as e.g. was done in RcppArray (also supporting |
Gee I just realized in horror that I think I never experimented / reached out to @jonclayden here! John, any 'feels' about extending RcppArray with this (pro: it seems to fit; con: it may clutter the package) or whether this should be something on its own (pro: self-contained is good ?; con: clutters package system?). |
Very happy to look into merging this into |
The commit referenced above provides a version of the implementation that avoids using helpers from C++14 ( |
Sounds good to me, @andrjohns is closer to the metal for a concrete use case. I am sure we can cook up a unit test or two, I always liked how you set up tester packages in RcppArray (and Rcpp has long done similar stuff for parts of its tests). |
I've added a tuple client stub package now, and unfortunately |
The problem seems to have been including the @andrjohns I'll add you as a contributor to the |
Yes, that documentation / implementation could do with a rewrite. It also throws me for loops at times. So twice the thanks for working through it !! |
|
We can close this as |
Reporting an Issue
Over in the cmdstanr package we recently added support for passing
std::tuple<>
types between c++ and R by treating it as aList
, and I was hoping to put together a PR to add it toRcpp
directly (I checked the issues and PRs but I couldn't find anything).Should these overloads/specifications live in
ListOf
orVectorBase
(or somewhere else completely)?Also feel completely free to let me know if I'm handling the conversions in a way that's fundamentally wrong/inefficient!
The implementation is below, and just a note that the
stan::math::apply
is just c++11 implementation ofstd::apply
:The text was updated successfully, but these errors were encountered: