demangle.Rddemangle gives the demangled type, sizeof its size (in bytes).
demangle(type = "int", ...)
sizeof(type = "int", ...)The type we want to demangle
Further argument for cppFunction
The following function is compiled and invoked:
SEXP demangle_this_type(){
typedef
return wrap( DEMANGLE(type) ) ;
}
SEXP sizeof_this_type(){
typedef
return wrap( sizeof(type) ) ;
}
DEMANGLE is a macro in Rcpp that does the work.
The demangled type, as a string.
See this chapter from the GNU C++ library manual.
We only know how to demangle with gcc. If you know how to demangle types with your compiler, let us know.
cppFunction is used to compile the function demangle creates.
if (FALSE) { # \dontrun{
demangle( "int64_t" )
demangle( "uint64_t" )
demangle( "NumericVector" )
demangle( "std::map<std::string,double>" )
sizeof( "long" )
sizeof( "long long" )
} # }