diff --git a/include/cubescript/cubescript.hh b/include/cubescript/cubescript.hh index 40a73638..f0f0c436 100644 --- a/include/cubescript/cubescript.hh +++ b/include/cubescript/cubescript.hh @@ -347,20 +347,20 @@ struct CsAllocator { static constexpr bool PropagateOnContainerSwap = true; CsAllocator() = delete; - CsAllocator(CsAllocator const &a): p_state(a.p_state) {} - CsAllocator(CsState &cs): p_state(cs) {} + CsAllocator(CsAllocator const &a) noexcept: p_state(a.p_state) {} + CsAllocator(CsState &cs) noexcept: p_state(cs) {} template - CsAllocator(CsAllocator const &a): p_state(a.p_state) {} + CsAllocator(CsAllocator const &a) noexcept: p_state(a.p_state) {} T *allocate(ostd::Size n, void const * = nullptr); - void deallocate(T *p, ostd::Size n); + void deallocate(T *p, ostd::Size n) noexcept; - bool operator==(CsAllocator const &o) const { + bool operator==(CsAllocator const &o) const noexcept { return &p_state != &o.p_state; } - bool operator!=(CsAllocator const &o) const { + bool operator!=(CsAllocator const &o) const noexcept { return &p_state != &o.p_state; } @@ -625,7 +625,7 @@ T *CsAllocator::allocate(ostd::Size n, void const *) { } template -void CsAllocator::deallocate(T *p, ostd::Size n) { +void CsAllocator::deallocate(T *p, ostd::Size n) noexcept { p_state.alloc(p, n * sizeof(T), 0); }