-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
RcppDeepState supports the analysis of functions that contain arguments which type falls in the following list:
Rcpp::NumericVectorRcpp::NumericMatrixRcpp::CharacterVectorRcpp::IntegerVectorarma::matstd::doublestd::stringstd::int
However I found that if a function contains a Rcpp::String argument, the function will no be analyzed. It will be a good step to implement this lack and add the support for Rcpp::String arguments. RcppDeepState now only accepts std::string arguments, not Rcpp::String.
@tdhock I plan to solve this in a new pull request.
Steps to reproduce
I created a simple Rcpp based package containing the getLen function that calculates the length of a Rcpp::String.
#include <Rcpp.h>
#include <string>
using namespace std;
// [[Rcpp::export]]
int getLen(Rcpp::String arg1){
return(strlen(arg1.get_cstr()));
}However, if I attempt to compile this package using RcppDeepState, an error is thrown.
The Rcpp::String argument is not supported, which is the reason for this.
> require("RcppDeepState")
> deepstate_harness_compile_run("/home/fabri/test/testHarness/Rcpp/getLen", verbose=TRUE)
...
We can't test the function - getLen - due to the following datatypes falling out of the allowed ones: String
Error in deepstate_pkg_create(package_path, verbose) :
Testharnesses cannot be created for the package - datatypes fall out of specified list!!Metadata
Metadata
Assignees
Labels
No labels