Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Context


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.