Why not just use one std::string and avoid re-implementing the allocation logic?