P
persres
Hi,
I have the following code -
string str("12 3213 asdf 21");
vector<int> v;
copy(istream_iterator<int>(istringstream(str)) ,
istream_iterator<int>(), back_inserter(v) );
I expected copy to throw because the operator >> would have failed due
to the 'asdf' string present.
However, it doesn't throw. Do you know why,
How can i get it to throw or return an errror.
I have the following code -
string str("12 3213 asdf 21");
vector<int> v;
copy(istream_iterator<int>(istringstream(str)) ,
istream_iterator<int>(), back_inserter(v) );
I expected copy to throw because the operator >> would have failed due
to the 'asdf' string present.
However, it doesn't throw. Do you know why,
How can i get it to throw or return an errror.