in c++98, the memory of std::string(c++11 required it is contiguous) may not a contiguous storage, what about boost::container::string?Is it promise the memory is contiguous?
If it is contiguous, it could work with the legacy api more naturally.
boost::container::string str("some data\0");
old_api(&str[0]);
don't need to copy it to vector again
boost::container::string str("some data\0");
std::vector<char> buffer(str.begin(), str.end());
old_api(&str[0]);
Thanks