r/programming • • Apr 01 '13

Ten C++11 Features Every C++ Developer Should Use

http://www.codeproject.com/Articles/570638/Ten-Cplusplus11-Features-Every-Cplusplus-Developer
469 Upvotes

283 comments sorted by

View all comments

Show parent comments

8

u/benibela2 Apr 02 '13

Then you just have to type it somewhere else, does not help if you use different types in almost every container

And how is a typedef better than an auto? In both cases you have to look something up

-10

u/Dicethrower Apr 02 '13

Because fooBarPair is not ambiguous if you're consistent. At the very least, it says something about the variable type. auto, never does that. Also, typdef is standard C(++), auto is not.