[Qt-interest] About QScopedPointer
Anton Chernov
mechernov at gmail.com
Fri May 13 16:53:34 CEST 2011
Ugh oh.. Yep, you'r absoutly right.
func(QScopedPointer &p)
is cool.
2011/5/13 Thiago Macieira <thiago at kde.org>
> On Friday, 13 de May de 2011 12:07:34 Anton Chernov wrote:
> > fund( &( d->data() ) );
> >
> > am i evil?
>
> This sounds like a good idea, until you try to compile:
>
> $ g++ -fsyntax-only -xc++ - <<EOF
> int *foo(); void bar(void **); int main() { bar(&foo()); }
> EOF
> <stdin>: In function ‘int main()’:
> <stdin>:1:54: error: lvalue required as unary ‘&’ operand
>
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110513/d13e54c8/attachment.html
More information about the Qt-interest-old
mailing list