mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
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:
parent
09035eb1e4
commit
6ed138076d
@ -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};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user