Skip to content

Fast conversion of stacktraces to std::string #57

@antoshkka1

Description

@antoshkka1
/// Outputs stacktrace in a human readable format to std::string; unsafe to use in async handlers.
template <class Allocator>
std::string to_string(const basic_stacktrace<Allocator>& bt) {
    if (bt) {
        return boost::stacktrace::detail::to_string(&bt.as_vector()[0], bt.size());
    } else {
        return std::string();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions