Why C++ compiler doesn't guess that its initializer_list
and not 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;
}