From 62be4c856d97a52cb84f155230e2b43ffac95c57 Mon Sep 17 00:00:00 2001 From: Sergey Zubkov Date: Thu, 11 Jun 2020 14:35:31 -0400 Subject: [PATCH] ES.28: drop broken and unnecessary example, closes #1590 --- CppCoreGuidelines.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index df822e2..532cc45 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -10972,16 +10972,6 @@ It nicely encapsulates local initialization, including cleaning up scratch varia 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. ##### Enforcement