Boost logo

Boost :

Subject: Re: [boost] [Stacktrace] Second review begins today 17th Mar ends 26th Mar
From: Peter Dimov (lists_at_[hidden])
Date: 2017-03-18 15:58:46


> 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*.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk