Fixed get_string example in F.21 (#1160)

In the 'all values as return value' example in F.21, the passed istream was not used in the function.
This commit is contained in:
echeij 2018-03-14 15:14:07 +01:00 committed by Sergey Zubkov
parent 09035eb1e4
commit 6ed138076d

View File

@ -3105,7 +3105,7 @@ To compare, if we passed out all values as return values, we would something lik
pair<istream&, string> get_string(istream& is); // not recommended
{
string s;
cin >> s;
is >> s;
return {is, s};
}