Skip to content

Commit 62be4c8

Browse files
committed
ES.28: drop broken and unnecessary example, closes #1590
1 parent 9efcaf0 commit 62be4c8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

CppCoreGuidelines.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10972,16 +10972,6 @@ It nicely encapsulates local initialization, including cleaning up scratch varia
1097210972
return val;
1097310973
}();
1097410974

10975-
##### Example
10976-
10977-
string var = [&] {
10978-
if (!in) return ""; // default
10979-
string s;
10980-
for (char c : in >> c)
10981-
s += toupper(c);
10982-
return s;
10983-
}(); // note ()
10984-
1098510975
If at all possible, reduce the conditions to a simple set of alternatives (e.g., an `enum`) and don't mix up selection and initialization.
1098610976

1098710977
##### Enforcement

0 commit comments

Comments
 (0)