Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.7
-
None
Description
A violation of the C++ standard regarding explicit class specializations in objloader.cpp. Namely, the specialization:
QT3D_DECLARE_TYPEINFO(Qt3DRender, ByteArraySplitter::Entry, Q_PRIMITIVE_TYPE)
Appears after the first use of the structure ByteArraySplitter::Entry in the member:
QVarLengthArray<Entry, 16> m_entries;
Of the class ByteArraySplitter. Although g++ allows this, this violates the C++ standard section 14.7.3, clause 6:
If a template, a member template or a member of a class template is explicitly specialized then that specialization shall be declared before the first use of that specialization that would cause an implicit instantiation to take place, in every translation unit in which such a use occurs
Although g++ compiles this code, it is a violation of the standard.