21#ifndef Rcpp__exceptions_impl__h
22#define Rcpp__exceptions_impl__h
25#ifndef RCPP_DEMANGLER_ENABLED
26# if defined(_WIN32) || \
27 defined(__FreeBSD__) || \
28 defined(__NetBSD__) || \
29 defined(__OpenBSD__) || \
30 defined(__DragonFly__) || \
31 defined(__CYGWIN__) || \
34 defined(__MUSL__) || \
35 defined(__HAIKU__) || \
37# define RCPP_DEMANGLER_ENABLED 0
38# elif defined(__GNUC__) || defined(__clang__)
40# define RCPP_DEMANGLER_ENABLED 1
42# define RCPP_DEMANGLER_ENABLED 0
49#if RCPP_DEMANGLER_ENABLED
52 static std::string buffer;
55 size_t last_open = buffer.find_last_of(
'(');
77#if RCPP_DEMANGLER_ENABLED
105 trace.attr(
"class") =
"Rcpp_stack_trace";
std::vector< std::string > stack
void copy_stack_trace_to_r() const
void record_stack_trace()
std::string demangle(const std::string &name)
static internal::NamedPlaceHolder _
attribute_hidden SEXP rcpp_set_stack_trace(SEXP e)