From 2268c240601a59cc631f2e99f14f0f49a2db1271 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 11 Sep 2016 01:26:38 +0200 Subject: [PATCH] allocator fix --- include/cubescript/cubescript.hh | 6 ++++++ 1 file changed, 6 insertions(+) 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);