diff --git a/include/cubescript/cubescript.hh b/include/cubescript/cubescript.hh index 89fd4fb..40a7363 100644 --- a/include/cubescript/cubescript.hh +++ b/include/cubescript/cubescript.hh @@ -338,6 +338,9 @@ using CsPanicCb = ostd::Function; template struct CsAllocator { + template + friend struct CsAllocator; + using Value = T; static constexpr bool PropagateOnContainerCopyAssignment = true; static constexpr bool PropagateOnContainerMoveAssignment = true; @@ -347,6 +350,9 @@ struct CsAllocator { CsAllocator(CsAllocator const &a): p_state(a.p_state) {} CsAllocator(CsState &cs): p_state(cs) {} + template + CsAllocator(CsAllocator const &a): p_state(a.p_state) {} + T *allocate(ostd::Size n, void const * = nullptr); void deallocate(T *p, ostd::Size n);