Skip to content
Prev 8973 / 10988 Next

[Rcpp-devel] Wrapping std::vector<T> when Rcpp::wrap is user-overloaded for T

Hi Dirk,
Thanks. I can do that. (The thing I have in fact done, which works, is
just not to use std::pair, and instead use my own type with operator
SEXP defined.)

However, it would be nice to also be able to wrap, e.g.,
std::set<std::pair<T, S>>, std::vector<std::vector<std::pair<T, S>>>,
etc., just like one could do if it std::pair<T, S> was replaced by
std::map<T, S> in these examples. It seems like this should
theoretically be possible for std::pair, given that it works for
std::map. However, I am not a template expert and have had trouble
following the library code.

Thanks,
Nate