From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-10-22 10:01:11
Eric Niebler wrote:
>> What frequent use cases do you see where people will want to change
>> bits rather than work with characters?
> utf8_string str;
> ifstream file("utf8.txt");
> istreambuf_iterator<char8_t> begin(file), end;
> std::copy( begin, end, back_inserter(str) );
> This can't throw if you want people to use your string class.
And what if the example is changed to be:
istreambuf_iterator<char8_t> begin(file), end;
std::copy( begin, end, back_inserter(str) );
? This use case is common, so you have to provide something like
"local8bit_back_inserter", and then to be explicit it's better to provide
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk