the following code doen't work and I don't know why:
template <typename T, size_t ReserveSize=16, size_t MemoryPoolNumElements = 8192, size_t Alignment=16, size_t NumPagesPerMemoryPool = 16, typename T_Size=uint16_t, uint8_t MemoryPoolGroupElementsExp=5>
using Vector = MemoryPool<T, MemoryPoolNumElements, Alignment, NumPagesPerMemoryPool, T_Size>::MultipleObjectsAllocator<MemoryPoolGroupElementsExp>::Vector < ReserveSize > ;
I get some compiler errors, including C2039: Vector is not an element of "global namespace".In class MemoryPool:
template <uint8_t GroupElementsExp=3>
/*
A memory pool which allows allocation of multiple objects per pointer.
*/
using MultipleObjectsAllocator = MultiElementMemoryPool<T, ElementsPerPage, Alignment, T_Size, GroupElementsExp>;
In class MultiElementMemoryPool:template <size_t ReserveSize = 16>
/*
A vector.
*/
using Vector = Vector_t<T,ReserveSize,ElementsPerPage,Alignment,NumPagesPerMemoryPool,T_Size,GroupElementsExp>;
Vector_t is declared inside MultiElementMemoryPool and MultiElementMemoryPool is declared inside MemoryPool.The following does work, but it's not what I want:
template <typename T, size_t ReserveSize=16, size_t MemoryPoolNumElements = 8192, size_t Alignment=16, size_t NumPagesPerMemoryPool = 16, typename T_Size=uint16_t, uint8_t MemoryPoolGroupElementsExp=5>
using Vector = MemoryPool<T, MemoryPoolNumElements, Alignment, NumPagesPerMemoryPool, T_Size>;