Re: [Development] QForeachContainer mystery

2014-02-14 Thread Olivier Goffart
On Monday 10 February 2014 07:58:06 Thiago Macieira wrote: > Em seg 10 fev 2014, às 16:27:56, Joerg Bornemann escreveu: > > On 10-Feb-14 15:23, Joerg Bornemann wrote: > > > Looks like __typeof__, which is used when building with a recent gcc, > > > behaves differently when passing a c'tor? > > > >

Re: [Development] QForeachContainer mystery

2014-02-10 Thread Joerg Bornemann
On 10-Feb-14 16:58, Thiago Macieira wrote: > It's actually not a constructor. It's the ages-old C++ mystery: what does this > declare? > > QStringList(other); > > It's actually a function declaration. Aaahh right. Which explains why the function *call* works. Joerg ___

Re: [Development] QForeachContainer mystery

2014-02-10 Thread Thiago Macieira
Em seg 10 fev 2014, às 16:27:56, Joerg Bornemann escreveu: > On 10-Feb-14 15:23, Joerg Bornemann wrote: > > Looks like __typeof__, which is used when building with a recent gcc, > > behaves differently when passing a c'tor? > > Well it seems to be the type of the constructor, not the type of the >

Re: [Development] QForeachContainer mystery

2014-02-10 Thread Joerg Bornemann
On 10-Feb-14 15:23, Joerg Bornemann wrote: > Looks like __typeof__, which is used when building with a recent gcc, > behaves differently when passing a c'tor? Well it seems to be the type of the constructor, not the type of the constructed object. This patch fixes the incompatibility between MSV

[Development] QForeachContainer mystery

2014-02-10 Thread Joerg Bornemann
Consider the following piece of code: QStringList other; foreach (QString str, QStringList(other)) ;// do something This builds fine with Visual Studio 2013. With gcc 4.7.2 and clang 3.0-6.2 we get: error: request for member 'brk' in '_container_', which is of non-class type 'QForeachC