
22 Oct
2004
22 Oct
'04
3:09 p.m.
Eric Niebler wrote:
utf8_string str; str.reserve(some_big_number);
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.
utf8_string str( begin, end );