From 6ed138076dc2b947907df70641d4ba3f94634088 Mon Sep 17 00:00:00 2001 From: echeij Date: Wed, 14 Mar 2018 15:14:07 +0100 Subject: [PATCH] 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. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 2db8b22..76322cb 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3105,7 +3105,7 @@ To compare, if we passed out all values as return values, we would something lik pair get_string(istream& is); // not recommended { string s; - cin >> s; + is >> s; return {is, s}; }