在代码中
void Fnc( long = 10 ) { }
void Fnc( ) = delete;
int main( int, char** )
{
Fnc( );
return 0;
}
在 Func 调用中,我的编译器提示调用不明确。帮助!我不明白为什么会这样。
最佳答案
根据 Delete Function Definition :
The definition form "=delete;" indicates that the function may not be used. However, all lookup and overload resolution occurs before the deleted definition is noted. That is, it is the definition that is deleted, not the symbol; overloads that resolve to that definition are ill-formed.
这就是为什么你会收到模棱两可的电话。
关于c++ - 由于删除的功能调用不明确?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38565358/