Allow using variadic templates instead of pre-generated code where supported by andrjohns · Pull Request #1303 · RcppCore/Rcpp (original) (raw)

Opening this as a draft/PoC PR for feedback on the general idea/approach before I make more changes.

For users/systems with c++11 compilers, replacing the generated code in Rcpp with variadic templates could reduce the unnecessary compilation of unused overloads/operators and also remove the limitations on the number of parameters that can be used.

Naturally it would greatly reduce the code in the headers if the generated code were replaced with variadic templates entirely, but I can understand the goal of pre-c++11 compatibility so have made the template use conditional.

Let me know if this would be a useful change in general, or if I should approach things differently, and I'll work on the rest.

Thanks!

Checklist