[Development] Qt/5.0.0, clang/3.2, C++11 and qRegisterMetaType, Q_BASIC_ATOMIC_INITIALIZER

Thiago Macieira thiago.macieira at intel.com
Thu Apr 11 20:17:22 CEST 2013


On quinta-feira, 11 de abril de 2013 19.53.04, Jan Kundrát wrote:
> qmetatype.h:669:32: error: copying variable of type 'QBasicAtomicInt' (aka
> 'QBasicAtomicInteger<int>') invokes deleted constructor
>         static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0);
[...]
> qbasicatomic.h:198:5: note: function has been explicitly marked deleted here
>     QBasicAtomicInteger(const QBasicAtomicInteger &) = delete;

> Is that a bug in clang, or in Qt?

Clang.

Its support for brace initialisation was incomplete. See the comment:

# if defined(Q_CC_CLANG) && ((((__clang_major__ * 100) + __clang_minor__) < 
302) \
                             || defined(__apple_build_version__) \
                            )
   /* Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for "stock" clang before 
version 3.2.
      Apple's version has different (higher!) version numbers, so disable it 
for all of them for now.
      (The only way to distinguish between them seems to be a check for 
__apple_build_version__ .)

      For details about the bug: see 
http://llvm.org/bugs/show_bug.cgi?id=12670
    */

That bug is marked as fixed, but it does not show which version of Clang it was 
included in.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130411/e03c851d/attachment.sig>


More information about the Development mailing list