
22 Oct
2004
22 Oct
'04
4:23 p.m.
David Abrahams wrote:
Is this going to be illegal for most fs, then?
std::copy( std::istream_iterator<char>(f), std::istream_iterator<char>(), std::back_inserter(my_utf8_string));
I think it pretty much has to work.
my_utf8_string.append( std::istream_iterator<char>(f), std::istream_iterator<char>() ); is the proper spelling. Or, if you prefer, my_utf8_string.insert( my_utf8_string.end(), std::istream_iterator<char>(f), std::istream_iterator<char>() ); Character by character push_back loops just aren't cool.