Vladimir Prus
Russell Hind wrote:
Vladimir Prus wrote:
I have tried to explain this in great detail. Let me rephrase again: neither template not define is really attractive when used in a library interface.
Maybe I'm missing something, but couldn't it be like std::string and std::wstring?
I think std::string and std::wstring have exactly the same drawbacks. On a library interface (when the library is compiled one, not-header only), you have to use either string of wstring. If there were single std::string which supported wide characters, there would be no choice, and most C++ libraries were at last half-ready for Unicode.
As an example, there are two environment with a single string type: Qt and Java, and in both there's no issue of Unicode any more, AFAICT.
Har! Java "unicode" is utf-16, I think. Unicode now has at least 32 bits per character, IIUC, so I don't think any simplistic interface choices can make a non-issue of Unicode. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com