On Sunday 02 December 2012 23:02:15 Thiago Macieira wrote:
> On segunda-feira, 3 de dezembro de 2012 07.53.07, Olivier Goffart wrote:
> > I was able to reproduce the error by making QMetaTypeIdQObject a template.
> > (On linux with both clang 3.1 and clang trunk)
> > Attached the problematic testase.
> > 
> > I am not sure yet if this is a compiler bug or if we are indeed doing a
> > copy.
> 
> Does it at least compile as:
> 
>         static QBasicAtomicInteger metatype_id { 0 };
> 
> (i.e., without the =)

Yes it does compile without the =.
It also compiles if the QMetaTypeIdQObject is not a template type.

But it still does not compile even without the {}:
static QBasicAtomicInteger metatype_id = 0;

So it looks like a compiler bug.

-- 
Olivier

Woboq - Qt services and support - http://woboq.com
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to