From 9a976c8a854107b2689916a037e6a26e8e7dc3d6 Mon Sep 17 00:00:00 2001 From: Johannes Laire Date: Tue, 29 Sep 2015 11:00:13 +0200 Subject: [PATCH] Fix bugs in examples --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1f5ea8f..e55bf44 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -808,8 +808,8 @@ Prefer [RAII](#Rr-raii): if (p==nullptr) throw Nullptr_error{}; int n = strlen(p); auto buf = new char[n]; - for (int i = 0; i> value; // check for errors - } + }; auto print(auto& output, const auto& value) { @@ -1736,7 +1736,7 @@ Small simple functions are easily inlined where the cost of a function call is s constexpr int max_exp = 17; // constexpr enables this to be used in Expects Expects(0<=n && n r, const X& v) // find v in r + X* find(array_view r, const X& v); // find v in r vector vec; // ...