cleaner use of allocator construct