我正在学习 C++11,偶然发现了统一初始化程序。
我不明白以下代码应该显示“最令人烦恼的解析”歧义:
#include<iostream>
class Timer
{
public:
Timer() {}
};
int main()
{
auto dv = Timer(); // What is Timer() ? And what type is dv?
int time_keeper(Timer()); // This is a function right? And why isn't the argument " Timer (*) ()" ?
return 0;
}