Antony Polukhin wrote:
is a lesser evil. The huge problem is a COM header with a lot of things in global namespace and a bunch of unportable vendor specific extensions. One pain of death, I'm not going to rewrite all the COM macro-spaghetti code (but I'm open to pull requests). The only good solution to avoid global namespace polution - is not to use the library in header only mode on MSVC.
The suggestion is not to rewrite the COM code. It's to not include it unless
needed.
template <class E>
void throw_with_trace(const E& e) {
throw boost::enable_error_info(e)
<< traced(boost::stacktrace::stacktrace());
}
Here no COM or
2. There should exist a documented way to construct a stacktrace from an array of void const*. This is currently possible via from_dump, but it's not guaranteed to work; the format of the dump is technically an implementation detail of the library and may change.
Where that could be useful?
It's useful if one wants to capture the stack trace manually in order to avoid a dependency on stacktrace at the capture point. boost::throw_exception, for instance, could be made to do so.