allocator fix

master
Daniel Kolesa 2016-09-11 01:26:38 +02:00
parent fa5e360726
commit 2268c24060
1 changed files with 6 additions and 0 deletions

View File

@ -338,6 +338,9 @@ using CsPanicCb = ostd::Function<void(ostd::ConstCharRange, CsStackState)>;
template<typename T>
struct CsAllocator {
template<typename TT>
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<typename TT>
CsAllocator(CsAllocator<TT> const &a): p_state(a.p_state) {}
T *allocate(ostd::Size n, void const * = nullptr);
void deallocate(T *p, ostd::Size n);