mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03: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:
@@ -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
|
pair<istream&, string> get_string(istream& is); // not recommended
|
||||||
{
|
{
|
||||||
string s;
|
string s;
|
||||||
cin >> s;
|
is >> s;
|
||||||
return {is, s};
|
return {is, s};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user