When I was practicing c++11, I tried the following conditions:
auto num1=(4, 5);
auto num2={4, 5};
As expected, num2 is initialized as vector of integers with two elements, while num1 is initialized as an integer with value 5.
Actually I thought num1 should not be compiled. What does (4, 5) mean here?
Aucun commentaire:
Enregistrer un commentaire