Boost logo

Boost :

Subject: Re: [boost] Review Manager needed for stacktrace library
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2016-10-25 15:14:35


2016-10-25 22:00 GMT+03:00 Nat Goodspeed <nat_at_[hidden]>:
> On Tue, Oct 25, 2016 at 2:57 PM, Antony Polukhin <antoshkka_at_[hidden]> wrote:
>
>> Started implementing that: added begin/end functions, iterator and
>> class frame. Is it ok to have a nonmovable type for a stack frame?
>
> Could it be move-only?

Yes, but that will make the situation worse :(
Class stacktrace does not hold actual `frame` instances, it holds a
raw pointers or some high-level stuff that has different size
depending on the backtrace backend. If I make the `frame` class
copyable, it will either
* break the ability to disable stacktraces without recompilation; will
not allow to change backends transparently
* lead to nonintuitive situation, that `frame` is just a reference to
actual frame data that is kept inside stcktrace class. So a copy of
`frame` becomes invalid after the stacktrace destruction.

I'd rather avoid such design.

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