
18 Mar
2017
18 Mar
'17
3:58 p.m.
You can find the documentation at http://apolukhin.github.io/stacktrace/index.html and the github repo at https://github.com/apolukhin/stacktrace.
I see that frame supports construction from a function pointer: void print_signal_handler_and_exit() { void* p = reinterpret_cast<void*>(::signal(SIGSEGV, SIG_DFL)); boost::stacktrace::frame f(p); std::cout << f << std::endl; std::exit(0); } but it takes void*. On both POSIX and Windows, pointers to functions and void* have the same representation, but if we want to be strictly standard conforming, frame should take void(*)(). The standard guarantees that pointers to functions can be cast to void(*)(), but it doesn't guarantee it for void*.