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 13:18:13


> You can find the documentation at
> http://apolukhin.github.io/stacktrace/index.html and the github repo
> at https://github.com/apolukhin/stacktrace.

I wonder if basic_stacktrace, currently

template <class Allocator>
class basic_stacktrace {
    boost::container::vector<frame, Allocator> impl_;
    /*...*/
};

would be better of as

template < class Container = std::vector<frame> >
class basic_stacktrace {
    static_assert( std::is_same<typename Container::value_type,
frame>::value,
        "The value_type of the Container parameter must be
stacktrace::frame" );

    Container impl_;

    /*...*/
};

This still supports the current functionality of replacing the allocator,
but it also allows

    template<size_t N> using fixed_stacktrace =
basic_stacktrace<std::array<frame, N>>;

which gets us the previous iteration of the library. Fixed storage does have
its uses, and while it's possible to use an in-place allocator to get it,
this is much easier.


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