为什么C ++编译器不会猜测它是initializer_list
而不是int
?>
#include <iostream>
#include <typeinfo>
int main() {
auto f = 45; // int, fine.
auto li {12,2,54,65}; // initializer_list, as expected/
auto A{12}; // ????
std::cout<<typeid(A).name()<<std::endl;
return 0;
}