[Development] Qt 4.8 clang and libc++

Thiago Macieira thiago.macieira at intel.com
Mon Sep 10 10:25:03 CEST 2012


On segunda-feira, 10 de setembro de 2012 10.07.17, Thiago Macieira wrote:
> On segunda-feira, 10 de setembro de 2012 09.57.37, Sylvain Pointeau wrote:
> > In file included from animation/qabstractanimation.cpp:1434:
> > .moc/release-shared/moc_qabstractanimation.cpp:37:1: error: initialization
> > of non-aggregate type 'QBasicAtomicInt'
> > 
> >       (aka 'QBasicAtomicInteger<int>') with an initializer list
> > 
> > QT_MOC_LITERAL(4, 42, 25),
> > 
> > Is it linked to the clang/libc++ issue? or is it another kind of issue?
> > note that I deactivated the initializer list and the decltype.
> 
> I had a similar issue with ICC 13.0, but since the ICC documentation says
> that its constexpr support is only partial, I attributed it to a compiler
> bug.
> 
> Try turning off constexpr support.

Here's your testcase:
$ cat x.cpp

struct Foo { constexpr Foo(int i = 0) : i(i) {} int i; };
struct Bar { Foo x; };
Bar f = { { 1 } };

$ clang -std=c++11 -c x.cpp
x.cpp:4:11: error: initialization of non-aggregate type 'Foo' with an 
initializer list
Bar f = { { 1 } };
          ^~~~~


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden




More information about the Development mailing list