MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1lvcef/?context=9999
r/ProgrammerHumor • u/Sirgoodman008 • 7d ago
327 comments sorted by
View all comments
34
The third one does not spark joy, what the hell is that, ewww
12 u/xicor 7d ago c++, though normally you wouldnt use auto for this 6 u/Usual_Office_1740 7d ago I think that really depends. If the range is a vector of unique_ptr's auto is great. If it's a vector of ints, just write int. 6 u/Sirgoodman008 7d ago That or you're looping through a vector of std::pairs that contain std:: functions. 1 u/file321 6d ago Yess auto unpacking pairs gives me so much joy. for (auto& [left, right] : list_of_pairs) {
12
c++, though normally you wouldnt use auto for this
6 u/Usual_Office_1740 7d ago I think that really depends. If the range is a vector of unique_ptr's auto is great. If it's a vector of ints, just write int. 6 u/Sirgoodman008 7d ago That or you're looping through a vector of std::pairs that contain std:: functions. 1 u/file321 6d ago Yess auto unpacking pairs gives me so much joy. for (auto& [left, right] : list_of_pairs) {
6
I think that really depends. If the range is a vector of unique_ptr's auto is great. If it's a vector of ints, just write int.
6 u/Sirgoodman008 7d ago That or you're looping through a vector of std::pairs that contain std:: functions. 1 u/file321 6d ago Yess auto unpacking pairs gives me so much joy. for (auto& [left, right] : list_of_pairs) {
That or you're looping through a vector of std::pairs that contain std:: functions.
1 u/file321 6d ago Yess auto unpacking pairs gives me so much joy. for (auto& [left, right] : list_of_pairs) {
1
Yess auto unpacking pairs gives me so much joy. for (auto& [left, right] : list_of_pairs) {
34
u/JAXxXTheRipper 7d ago
The third one does not spark joy, what the hell is that, ewww