-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
arbitrary number of arguments in RCPP_RETURN_VECTOR #38
Comments
Can you share some examples ? Not a big fan of variadics in a pre C++11 world. They bring type safety issues, ... |
E.g. writing a subset function that has two arguments - a Vector<> and an integer vector that will select appropriate elements from the Vector. |
Not sure it is worth generalizing it, we are going to end up with multiple macros like |
Perhaps I'm missing something about the compiler restrictions you have, but #define dispatch(FUN, SEXP, On Fri, Nov 15, 2013 at 12:57 AM, Romain François
|
variadic macros have only been integrated into the standard in C++11. So this is not standard C++, so we can't have this in Rcpp. it could go into Rcpp11 which assumes C++11. I'm closing this as it is not going to happen. sorry. |
Now we can implement this with the conditional define (with |
Maybe. Something small and local would be a good test. I would not want to have to TWICE the rev.dep'ing but it still works (maybe without the feature) in C++98 and adds a new chiefly at interface / edge feature that nothing else in Rcpp itself depends upon, we could. Alternatively, maybe an add-on package could be used. If you do it in headers all it "costs" users is another |
We need a minimal changes (example here) so existing code will work.
Is better define additional macro ( |
Currently it only take one-argument functions - add a variadic extension, to be able to use functions with multiple arguments in addition to just the SEXP.
The text was updated successfully, but these errors were encountered: