Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56789

Violation of C++ Standard in objloader.cpp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.7
    • Qt3D
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            nvelinov Nikola Velinov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes