I'm starting a new library and I'd like to use UTF-8. It seems to be good enough for the majority of the world, so that's what I'll go with. One of the libraries that my library stores UTF-8 with std::string. Is there a function in the standard library that converts to and from string and wstring while only ever storing UTF-8?
I'm thinking I'll set up this conversion right when I have to use the string with this other library. When reading from the other library, I'll convert to wstring. When writing to it, I'll give it wstring converted to string.
Also, are there any caveats here?