[Development] Using Qt 5 with C++11/Clang 3.1?
Stephen Chu
stephen at ju-ju.com
Fri Jul 13 15:44:05 CEST 2012
On 7/7/12 4:32 PM, Thiago Macieira wrote:
> On sábado, 7 de julho de 2012 11.17.58, Stephen Chu wrote:
>> /Qt/5.0/qtbase/include/QtCore/../../src/corelib/global/qflags.h:51:7:
>> note: 'QFlag' is not literal because it is not an aggregate and has no
>> constexpr constructors other than copy or move constructors
>> class QFlag
>> ^
>>
>> Adding Q_DECL_CONSTEXPR to QFlag constructor fixes it:
>>
>> Q_DECL_CONSTEXPR inline QFlag(int i);
>>
>> I don't know if if is another Clang bug.
>
> No, that looks like a real issue, Please submit the patch for the QFlag
> constexpr constructor.
I couldn't setup my Mac right to submit patch. Some SSH issue I can't
figure out how to get around. But I see it's been fixed a couple days
ago. So thank whoever patched it.
I also updated MacPorts clang 3.2 to a later version containing the fix
for the constructor issue and it compiles without modifying the code.
However, 3.2 (trunk 160101) generates the following warning:
/Qt/5.0/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:613:49:
warning: field is uninitialized when used here [-Wuninitialized]
inline QWeakPointer(X *ptr, bool) : d(ptr ? d->getAndRef(ptr) : 0),
value(ptr)
^
The warning makes sense to me on the appearance. Don't know enough about
internal stuffs to be sure though.
More information about the Development
mailing list