What is the advantage of using auto in function return type definition in C++11? ( foo2()
vs foo1()
)
int foo1(){
// ...
return 1;
}
auto foo2() ->int {
// ...
return 1;
}
int main()
{
foo1();
foo2();
return 0;
}
Aucun commentaire:
Enregistrer un commentaire