String literals, ASCII vs UTF-8
Stephan Bergmann
sbergman at redhat.com
Wed Feb 29 02:31:32 PST 2012
On 02/28/2012 02:39 PM, Stephan Bergmann wrote:
> On 02/28/2012 12:30 PM, Lubos Lunak wrote:
>> 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.
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41426>
Stephan
More information about the LibreOffice
mailing list