2 ms·
I think in C++1y we'll be able to define a function 'foreach' that we can use like: foreach(data, []<class T>(const T & item) { ofile << item << st
by marshray 13y ago
I think in C++1y we'll be able to define a function 'foreach' that we can use like:
foreach(data, []<class T>(const T & item) {
ofile << item << std::endl;
});
This should eliminate the potential implicit conversion to temp. But I'm not sure it's seriously better than the original range based for with auto.