0
结构这似乎微不足道,但在VS2015u3与初始化列表与vs2015u3
h:\lfwin32\lfwin32.h(21): error C2440: 'initializing': cannot convert from 'initializer list' to 'LFWin32::Timer::T'
h:\lfwin32\lfwin32.h(21): note: No constructor could take the source type, or constructor overload resolution was ambiguous
不起作用
namespace Timer {
struct T
{
int milliseconds = 0;
int cmd_id = 0;
};
T init(const HWND hwnd) {
T t = { 0, 0 } ;
return t;
}
}
呼叫者
auto timer = Timer::init();
错误,我会认为这是标准随着C + + 11以上。有没有我需要设置的选项?
这不仅仅是自C++ 14以来的一项功能吗? – Rakete1111