Boost logo

Boost :

Subject: Re: [boost] [Stacktrace] Second review begins today 17th Mar ends 26th Mar
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2017-03-20 19:29:25


2017-03-18 18:58 GMT+03:00 Peter Dimov via Boost <boost_at_[hidden]>:
>> You can find the documentation at
>> http://apolukhin.github.io/stacktrace/index.html and the github repo
>> at https://github.com/apolukhin/stacktrace.
<...>
> 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*.

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

I'll add a `template <class T> frame(T* addr)` and
`frame(void(*addr)())` constructors. This must satisfy all the needs
and allow to change underlying implementation for a platform where
sizeof(void*) != sizoef(void(*)())

-- 
Best regards,
Antony Polukhin

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