title: error: C2057: expected constant expression
body: <p>I'm trying to build a project orignally made on top of mingw but now we need to switch to MSVC++ (because a specific debugging library only supports that) but to my surprise, compiling that code even on new C++ version/Qt result in the error:</p>
  
  <blockquote>
    <p>error: C2057: expected constant expression</p>
  </blockquote>
  
  <p>The error is not part of my own source code rather Qt itself, from <code>qmetatype.h</code> header, so I have no idea how fix. I assumed it was missing C++11 flag, so I added <code>CONFIG += c++11</code> nothing changed. Then I tried to more specific and added <code>QMAKE_CXXFLAGS += /std:c++14</code> to <code>.pro</code> file. Same error. The line of error is:</p>
  
  <pre><code>struct CapabilitiesImpl&lt;T, std::random_access_iterator_tag&gt;
  { enum { IteratorCapabilities = RandomAccessCapability | BiDirectionalCapability | ForwardCapability }; };
  </code></pre>
  
  <p>NOTE: Since I was getting cl not found error, I do star the Qt creator from a <strong>qt.bat</strong> file like this:</p>
  
  <pre><code>call "C:\Program Files (x86)\Microsoft Visual
  Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
  "C:\Qt-MSVC\Qt5.7.1\Tools\QtCreator\bin\qtcreator.exe"
  </code></pre>
  
  <p>How can I fix that?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've tried to use an older version to see if it makes any differentce, which didn't but I got more context about the error:</p>
  
  <blockquote>
    <p>C:\Qt-MSVC\Qt5.5.0\5.5\msvc2013\include\QtCore\qmetatype.h:944: see
    reference to class template instantiation
    'QtMetaTypePrivate::CapabilitiesImpl,std::random_access_iterator_tag>'
    being compiled
    C:\Qt-MSVC\Qt5.5.0\5.5\msvc2013\include\QtCore\qmetatype.h:1015: see
    reference to class template instantiation
    'QtMetaTypePrivate::ContainerAPI' being compiled with [
        T=QVariantList ] C:\Qt-MSVC\Qt5.5.0\5.5\msvc2013\include\QtCore\qvariant.h:711: see
    reference to function template instantiation
    'QtMetaTypePrivate::QSequentialIterableImpl::QSequentialIterableImpl(const
    T *)' being compiled with [
        T=QVariantList ]</p>
  </blockquote>