|
Boost : |
Subject: Re: [boost] [Stacktrace] Second review begins today 17th Mar ends 26th Mar
From: Peter Dimov (lists_at_[hidden])
Date: 2017-03-20 20:52:31
Antony Polukhin wrote:
> In the C++ standard there is no requirement that pointer to frame is a
> pointer to function. C++ Standard does not mention frames at all and many
> OS return frames as just a void*, not void(*)().
That's true but you've stated that you don't want to support manually
captured frames. So what the OS returns should be irrelevant in principle -
it's an implementation detail that the library hides from the user.
You do support frames constructed from function pointers, such as the one
returned from ::signal, so this is what the constructor should take.
The only reason to take void* would be to support passing the return value
of dlsym to the constructor without a reinterpret_cast.
> I'll add a `template <class T> frame(T* addr)`
This will do if you also constrain it to is_function<T>.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk