add a method to BumpPtrAllocator that allows allocating elements