ES.28: drop broken and unnecessary example, closes #1590

This commit is contained in:
Sergey Zubkov
2020-06-11 14:35:31 -04:00
parent 9efcaf07f7
commit 62be4c856d

View File

@@ -10972,16 +10972,6 @@ It nicely encapsulates local initialization, including cleaning up scratch varia
return val; return val;
}(); }();
##### Example
string var = [&] {
if (!in) return ""; // default
string s;
for (char c : in >> c)
s += toupper(c);
return s;
}(); // note ()
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. 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.
##### Enforcement ##### Enforcement