Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

请问C++17 -> “std::any”是不是与QT的控件类有冲突?

  • std::any var = std::make_any<QPushButton>("123123", Q_NULLPTR);
    如上示例,无论我怎么写,编译器都会报错 如下:

    1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\any(471): error C2440: “初始化”: 无法从“initializer list”转换为“std::any”
    1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\any(470): note: 无构造函数可以接受源类型,或构造函数重载决策不明确
    note: 参见对正在编译的函数 模板 实例化“std::any std::make_any<QPushButton,const char(&)[7],nullptr>(const char (&)[7],nullptr &&)”的引用


Log in to reply