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

Build issue with visual studio and QT_NAMESPACE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.5.0
    • 6.5.0 RC
    • Core: Other
    • None
    • Visual studio 2019
      Enable QT_NAMESPACE
    • Windows

      Following build issue during the build with visual studio:

       

      qvariant.h(54): error C2888: 'const bool qIsRelocatable<QT_AME_NAMESPACE::QVariant>': symbol cannot be defined within namespace 'QT_AME_NAMESPACE' 

       

      The problem isn't the code of qvariant.h, it's visual studio compiler issue as explain here.

      The workaround is to change:

      template<> constexpr inline bool QtPrivate::qIsRelocatable<QVariant> = true;

      by:

      namespace QtPrivate 
      {
          template<> constexpr inline bool qIsRelocatable<QVariant> = true;
      } 

      Patch attached.

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

            manordheim Mårten Nordheim
            alexiseichst Alexis Eichstadt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes