How can I avoid the error error: ‘String’ does not name a type
(String, not string)
I have this MWE that works with Rcpp (this code is called from R via Rcpp)
#include <Rcpp.h>
#include <vector>
#include <set>
CharacterVector some_function(String& name) {
// do something
}
But if I use cpp11 then it doesn't work
#include <cpp11.hpp>
#include <vector>
#include <set>
strings some_function(String& name) {
// do something but gives and error because of the "String"
}