11VirtualBase::~VirtualBase() noexcept
23 const char *mangled_identifier = typeinfo.name();
25 auto it = m2d.find (mangled_identifier);
30 char *malloced_result = abi::__cxa_demangle (mangled_identifier, NULL, NULL, &status);
31 if (malloced_result && !status) {
33 auto it = m2d.find (mangled_identifier);
34 if (it != m2d.end()) {
35 free (malloced_result);
38 m2d[mangled_identifier] = malloced_result;
39 return malloced_result;
41 return mangled_identifier;
48 char *malloced_result = abi::__cxa_demangle (mangled_identifier, NULL, NULL, &status);
50 if (malloced_result && !status) {
51 result = malloced_result;
52 free (malloced_result);
54 return result.
empty() ? mangled_identifier : result;
70assertion_fatal (
const char *msg,
const char *file,
int line,
const char *func)
noexcept
72 logging_abort (ASSERTION, msg ? msg :
"", file, line, func);
77assertion_failed (
const char *msg,
const char *file,
int line,
const char *func)
noexcept
79 return logging (ASSERTION, msg ? msg :
"", file, line, func);
The Anklang C++ API namespace.
void assertion_failed(const char *msg, const char *file, int line, const char *func) noexcept
Print instructive message, handle "breakpoint", "backtrace" and "fatal-warnings" in $ASE_DEBUG.
const char * cxx_demangle(const std::type_info &typeinfo) noexcept
Demangle a std::typeinfo.name() string into a proper C++ type name.
void assertion_fatal(const char *msg, const char *file, int line, const char *func) noexcept
Print a debug message via assertion_failed() and abort the program.
void perror_die(const std::string &msg) noexcept
Issue a warning about an assertion error.