[Development] Using Qt 5 with C++11/Clang 3.1?
Olivier Goffart
olivier at woboq.com
Sat Jul 7 02:12:42 CEST 2012
On Friday 06 July 2012 17:26:13 Stephen Chu wrote:
> On 7/6/12 3:23 PM, Thiago Macieira wrote:
> > On sexta-feira, 6 de julho de 2012 14.53.56, Stephen Chu wrote:
> >> I tried Clang 3.1 and it compiles with or without the equal sign.
> >
> > Then I don't understand. If it supports brace-initialisation for non-PODs,
> > why is it complaining about QBasicAtomicInt?
>
> I took the preprocessor output of one of the moc_*.cpp files and find
> that it comes down to something like this:
[...]
> It seems the added constructor is confusing Clang. The same code
> compiles fine with GCC 4.7.
Yes,
This is the bug http://llvm.org/bugs/show_bug.cgi?id=12670
I spend my evening doing a patch before I saw that bug report and noticed
there was already one patch attached. But I think my patch is better :-)
Anyway, if we want to support that version of clang, this still need to be
worked around, so I suggest that the problematic code should be #ifdef'd out
for the 'broken' versions of clang.
--
Olivier
Woboq - Qt services and support - http://woboq.com
More information about the Development
mailing list