diff --git a/include/boost/histogram/unlimited_storage.hpp b/include/boost/histogram/unlimited_storage.hpp index 6b0d47f9..6d641dd6 100644 --- a/include/boost/histogram/unlimited_storage.hpp +++ b/include/boost/histogram/unlimited_storage.hpp @@ -38,23 +38,19 @@ struct requires_arithmetic {}; template using next_type = mp11::mp_at_c::value + 1)>; -template +template class construct_guard { public: using pointer = typename std::allocator_traits::pointer; construct_guard(Allocator& a, pointer p, std::size_t n) noexcept - : a_(a), p_(p), n_(n) {} + : a_(a), p_(p), n_(n) {} ~construct_guard() { - if (p_) { - a_.deallocate(p_, n_); - } + if (p_) { a_.deallocate(p_, n_); } } - void release() { - p_ = pointer(); - } + void release() { p_ = pointer(); } construct_guard(const construct_guard&) = delete; construct_guard& operator=(const construct_guard&) = delete;