22 Jul
2011
22 Jul
'11
9:31 a.m.
This way one can write things like:
vector<T> v; push_back(v, istream_range<T>(ifstream("some_file.txt")));
Of course, one must be careful with such things. Can you spot the bug in the following? BOOST_FOREACH(const string& s, istream_range<string>(ifstream("some_file.txt"))) cout << s; Regards, Nate