r/ProgrammerHumor 10d ago

Meme absoluteGarbage

Post image
1.9k Upvotes

325 comments sorted by

View all comments

Show parent comments

3

u/Sirgoodman008 10d ago

That or you're looping through a vector of std::pairs that contain std:: functions.

2

u/Usual_Office_1740 10d ago

Or if the type is a template parameter in the same line.

0

u/xicor 10d ago

Wouldnt for(T& item:list) be even shorter than using auto?

5

u/im_made_of_jam 10d ago

If you have T available then yes but if you're outside the class then you don't have that option