2016-10-25 22:00 GMT+03:00 Nat Goodspeed
On Tue, Oct 25, 2016 at 2:57 PM, Antony Polukhin
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