I think the easier thing to do would be to just always return a std::string. thanks for pointing it out.