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.
References
See this http://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html{chapter}
from the GNU C++ library manual.
See Also
cppFunction is used to compile the function demangle creates.