Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.12.2
-
None
Description
when use visual studio 2017 build the simple code, there will be error.
#include <QtCore/QtCore>
#include <bitset>
int main(int , char ** )
{ std::bitset<4> test; test.set(2); }the error is somthing like:
C:\log\Qt.5.12.2\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc /Fddebug\untitled16.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled16 -I. -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\include -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtWidgets -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtGui -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtANGLE -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore -Idebug -I. -IC:\VulkanSDK\1.0.51.0\include -I..\..\..\log\Qt.5.12.2\5.12.2\msvc2017_64\mkspecs\win32-msvc -Fodebug\ @C:\Users\ggg\AppData\Local\Temp\main.obj.16296.47.jom
main.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(256): error C2666: “operator /”: 10 个重载有相似的转换
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qsize.h(364): note: 可能是“const QSizeF operator /(const QSizeF &,qreal)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qsize.h(194): note: 或 “const QSize operator /(const QSize &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(427): note: 或 “QMarginsF operator /(const QMarginsF &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(213): note: 或 “QMargins operator /(const QMargins &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(207): note: 或 “QMargins operator /(const QMargins &,int)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(207): note: 或 “double operator /(int,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(207): note: 或 “double operator /(qfloat16,int) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(197): note: 或 “float operator /(float,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(197): note: 或 “float operator /(qfloat16,float) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(196): note: 或 “double operator /(double,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(196): note: 或 “double operator /(qfloat16,double) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(195): note: 或 “long double operator /(long double,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(195): note: 或 “long double operator /(qfloat16,long double) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(178): note: 或 “qfloat16 operator /(qfloat16,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qpoint.h(402): note: 或 “const QPointF operator /(const QPointF &,qreal)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qpoint.h(206): note: 或 “const QPoint operator /(const QPoint &,qreal)”
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(256): note: 或 “内置 C++ operator/(size_t, std::bitset<4>::<unnamed-enum-_Bitsperword>)”
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(256): note: 尝试匹配参数列表“(size_t, std::bitset<4>::<unnamed-enum-_Bitsperword>)”时
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(252): note: 编译 类 模板 成员函数 "std::bitset<4> &std::bitset<4>::set(size_t,bool)" 时
..\untitled16\main.cpp(11): note: 参见对正在编译的函数 模板 实例化“std::bitset<4> &std::bitset<4>::set(size_t,bool)”的引用
..\untitled16\main.cpp(10): note: 参见对正在编译的 类 模板 实例化 "std::bitset<4>" 的引用
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(258): error C2666: “operator /”: 10 个重载有相似的转换
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qsize.h(364): note: 可能是“const QSizeF operator /(const QSizeF &,qreal)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qsize.h(194): note: 或 “const QSize operator /(const QSize &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(427): note: 或 “QMarginsF operator /(const QMarginsF &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(213): note: 或 “QMargins operator /(const QMargins &,qreal)”
c:\log\qt.5.12.2\5.12.2\msvc2017_64\include\qtcore\qmargins.h(207): note: 或 “QMargins operator /(const QMargins &,int)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(207): note: 或 “double operator /(int,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(207): note: 或 “double operator /(qfloat16,int) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(197): note: 或 “float operator /(float,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(197): note: 或 “float operator /(qfloat16,float) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(196): note: 或 “double operator /(double,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(196): note: 或 “double operator /(qfloat16,double) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(195): note: 或 “long double operator /(long double,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(195): note: 或 “long double operator /(qfloat16,long double) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qfloat16.h(178): note: 或 “qfloat16 operator /(qfloat16,qfloat16) noexcept”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qpoint.h(402): note: 或 “const QPointF operator /(const QPointF &,qreal)”
C:\log\Qt.5.12.2\5.12.2\msvc2017_64\include\QtCore/qpoint.h(206): note: 或 “const QPoint operator /(const QPoint &,qreal)”
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(258): note: 或 “内置 C++ operator/(size_t, std::bitset<4>::<unnamed-enum-_Bitsperword>)”
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\bitset(258): note: 尝试匹配参数列表“(size_t, std::bitset<4>::<unnamed-enum-_Bitsperword>)”时
Attachments
Issue Links
- is replaced by
-
QTBUG-72073 [REG 5.11->5.12] MSVC 64bit: Compile error C2666 when using std::bitset with QtCore
- Closed