We use many literal XMLCh* string declarations in our codebase.
I am still not sure what is the safest, but most efficient way of declaring
these WITHOUT RELYING UPON A TRANSCODE.
With the compilation setting of -fshort-wchar (we are only interested in gcc)
are there any problems or caveats with using:
std::basic_string<XMLCh> my_string = (const XMLCh*)(L"the string that I wish
to declare");
Are there neater ways of doing the same?
I know of the alternative of using the chXX characters, etc:
std::basic_string<XMLCh> my_string = {'t','h','e',' ','s','t','r','i','n', ...
,chNull};
I don't really find this acceptable - the code is more or less unreadable. It
seems crazy to have to use a transcoder because there isn't a tidy way to
define a string literal.