On 02/28/2012 12:30 PM, Lubos Lunak wrote:
The reason for this is that I have patches adding more functions taking
string literals and there it makes much more sense to require only ASCII. For
example OUString::operator== can be simply a call to OUString::equalsAsciiL()
for ASCII, but for UTF-8 it requires a conversion and unicode comparison.
Yes.
PS: Any idea why ' OUString foo() { return "foo";} ' does not work, even
though the ctor is not explicit? I can't recall a reason why a return value
would need to be different from the other cases.
Looks like a GCC error to me.
struct S { S(char const (&)[2]); };
S f() { return "a"; }
compiles just fine with recent Clang and
<http://comeaucomputing.com/tryitout/>, but fails with
could not convert ‘(const char*)"a"’ from ‘const char*’ to ‘S’
on GCC.
Stephan
Context
Re: String literals, ASCII vs UTF-8 · Stephan Bergmann
Re: String literals, ASCII vs UTF-8 · Lubos Lunak
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.