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

namespaced qt-6 does not build with clang-cl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.2.3
    • Core: Other
    • None

    Description

      when trying to build my application against a namespaced qt-6, i'm getting lookup errors from within qt:

      [2022-03-04T03:40:37.623Z] In file included from D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtGui/qpainter.h:54:
      [2022-03-04T03:40:37.623Z] D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtGui/qpen.h(130,1): error: no template named 'is_trivial_v' in namespace 'MY_NAMESPACE::std'; did you mean '::std::is_trivial_v'?
      [2022-03-04T03:40:37.623Z] Q_DECLARE_SHARED(QPen)
      [2022-03-04T03:40:37.623Z] ^~~~~~~~~~~~~~~~~~~~~~
      [2022-03-04T03:40:37.623Z] D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtCore/qtypeinfo.h(203,32): note: expanded from macro 'Q_DECLARE_SHARED'
      [2022-03-04T03:40:37.623Z] #define Q_DECLARE_SHARED(TYPE) Q_DECLARE_SHARED_IMPL(TYPE, Q_RELOCATABLE_TYPE)
      [2022-03-04T03:40:37.623Z]                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [2022-03-04T03:40:37.623Z] D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtCore/qtypeinfo.h(198,44): note: expanded from macro 'Q_DECLARE_SHARED_IMPL'
      [2022-03-04T03:40:37.623Z] #define Q_DECLARE_SHARED_IMPL(TYPE, FLAGS) \
      [2022-03-04T03:40:37.623Z]                                            ^
      [2022-03-04T03:40:37.623Z] D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtCore/qtypeinfo.h(174,12): note: expanded from macro '\
      [2022-03-04T03:40:37.623Z] 
      [2022-03-04T03:40:37.623Z] Q_DECLARE_TYPEINFO'
      [2022-03-04T03:40:37.623Z] template<> \
      [2022-03-04T03:40:37.623Z]            ^
      [2022-03-04T03:40:37.623Z] D:\3rdparty\Qt\Qt-6.2.3-x64-static\include\QtCore/qtypeinfo.h(166,61): note: expanded from macro '\
      [2022-03-04T03:40:37.623Z] 
      [2022-03-04T03:40:37.623Z] Q_DECLARE_TYPEINFO_BODY'
      [2022-03-04T03:40:37.623Z]         isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v<TYPE>, \
      [2022-03-04T03:40:37.623Z]                                                             ^~~~~
      [2022-03-04T03:40:37.623Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\type_traits(574,28): note: '::std::is_trivial_v' declared here
      [2022-03-04T03:40:37.623Z] _INLINE_VAR constexpr bool is_trivial_v = __is_trivially_constructible(_Ty) && __is_trivially_copyable(_Ty);
      [2022-03-04T03:40:37.623Z]                            ^
      

      for some reason `namespace std` is resolved in `MY_NAMESPACE` (the namespace that i'm building my qt inside).

      ... i guess clang-cl is not an officially supported compiler, but nevertheless it might be interesting to figure out what's going wrong there ...

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes