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

QtQuick3D fails to compile with C++20 : allocator.destroy called in qtquick3d/src/3rdparty/embree//common/sys/vector.h:137

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.4.2, 6.5.0 Beta1
    • 6.4.1
    • Quick: 3D
    • None
    • Linux/Other display system
    • d0734df0e (6.4.2), ee60340a9 (6.4)

    Description

      QtQuick3D fails to compile with C++20 : unsupported function allocator.destroy called in qtquick3d/src/3rdparty/embree//common/sys/vector.h:137 alloc.destroy(&items[i])

      qt-everywhere-src-6.4.1/qtquick3d/src/3rdparty/embree/kernels/common/../../common/sys/vector.h:137:17: error: no member named 'destroy' in 'std::allocator<embree::RawBufferView>'
      alloc.destroy(&items[i]);

       

      age-old code of intel vector::clear() calls unsupported member function destroy on allocator object (deprecated in C+17, unsupported in C+20).

      Fix is easy: line 137 should be replaced by  

      std::allocator_traits<decltype(alloc)>::destroy(alloc, &items[i]);

       

       

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            cskumar Chandra Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes