Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.0 RC1
-
None
-
658dfef50085cbf7ac1157528d0ccc2b8a698c34
Description
When trying to build qtbase stable (5.1.1., 37351bbe) with clang (svn r185149) under Linux, we get compile errors even when building qmake:
/p/qtbase/include/QtCore/../../src/corelib/io/qurl.h:327:31: error: friend declaration specifying a default argument must be a definition friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW; ^ 1 error generated.
According to N3337 it seems the compiler is right, cf. ยง8.3.6.4 [dcl.fct.default] "If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit."
Attachments
For Gerrit Dashboard: QTBUG-32100 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
60150,3 | Remove default argument from declarations of qHash as friend | stable | qt/qtbase | Status: MERGED | +2 | 0 |