From 27d1c01782f2d266c280685b2e3dbba18dd8c084 Mon Sep 17 00:00:00 2001 From: Leonardo Perez Pulido Date: Fri, 24 Nov 2017 19:48:48 -0400 Subject: [PATCH 1/3] Typo: add missing semicolon --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1d87305..5a946bc 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -679,7 +679,7 @@ You don't need to write error handlers for errors caught at compile time. for (Int i = 1; i; i <<= 1) ++bits; if (bits < 32) - cerr << "Int too small\n" + cerr << "Int too small\n"; This example fails to achieve what it is trying to achieve (because overflow is undefined) and should be replaced with a simple `static_assert`: From 7f909cc18ef409356d8af009c195783890553085 Mon Sep 17 00:00:00 2001 From: Leonardo Perez Pulido Date: Sun, 26 Nov 2017 10:03:48 -0400 Subject: [PATCH 2/3] Typo: add missing comma --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 5a946bc..cade30e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1108,7 +1108,7 @@ Instead, we could use `vector`: ##### Note The standards library and the GSL are examples of this philosophy. -For example, instead of messing with the arrays, unions, cast, tricky lifetime issues, `gsl::owner`, etc. +For example, instead of messing with the arrays, unions, cast, tricky lifetime issues, `gsl::owner`, etc., that are needed to implement key abstractions, such as `vector`, `span`, `lock_guard`, and `future`, we use the libraries designed and implemented by people with more time and expertise than we usually have. Similarly, we can and should design and implement more specialized libraries, rather than leaving the users (often ourselves) From 16e270dee9002033c9d25277e0a726a22e14e0ac Mon Sep 17 00:00:00 2001 From: Leonardo Perez Pulido Date: Mon, 27 Nov 2017 10:43:15 -0400 Subject: [PATCH 3/3] Typo: add missing question mark --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index cade30e..84c615a 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1249,7 +1249,7 @@ Reporting through non-local variables (e.g., `errno`) is easily ignored. For exa // don't: no test of printf's return value fprintf(connection, "logging: %d %d %d\n", x, y, s); -What if the connection goes down so that no logging output is produced? See I.??. +What if the connection goes down so that no logging output is produced? See I.???. **Alternative**: Throw an exception. An exception cannot be ignored.