Not really related but still:
If you're turning those to strings, you shouldn't be wrapping them with a std::string copy constructor right?