c++ type information
demangle
gives the demangled type, sizeof
its size (in bytes).
demangle(type = "int", ...) sizeof(type = "int", ...)
type |
The type we want to demangle |
... |
Further argument for |
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.
We only know how to demangle with gcc. If you know how to demangle types with your compiler, let us know.
Romain Francois <romain@r-enthusiasts.com>
See this chapter from the GNU C++ library manual.
cppFunction
is used to compile the function demangle
creates.
## Not run: demangle( "int64_t" ) demangle( "uint64_t" ) demangle( "NumericVector" ) demangle( "std::map<std::string,double>" ) sizeof( "long" ) sizeof( "long long" ) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.