/// 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();
}
}