| 542 | namespace Rcpp { |
| 543 | template <typename RESULT_TYPE, typename... T> |
| 544 | void function(const char* name_, RESULT_TYPE (*fun)(T... t), const char* docstring = 0) { |
| 545 | Rcpp::Module* scope = ::getCurrentScope(); |
| 546 | if (scope) { |
| 547 | scope->Add(name_, new CppFunctionN<RESULT_TYPE, T...>(fun, docstring)); |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | template <typename RESULT_TYPE, typename... T> |
| 552 | void function(const char* name_, RESULT_TYPE (*fun)(T... t), Rcpp::List formals, const char* docstring = 0) { |
no test coverage detected