From f07be3e8fb1b5d96a3b8917d2b1145a8027a3d08 Mon Sep 17 00:00:00 2001 From: hsutter Date: Tue, 8 Dec 2015 07:33:28 -0800 Subject: [PATCH] Fixed typo in T.81 - issue #434 --- CppCoreGuidelines.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9d72b58..59d263d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3928,7 +3928,7 @@ Compilers do not read comments. ##### Note If a constructor acquires a resource (to create a valid object), that resource should be [released by the destructor](#Rc-dtor-release). -The idiom of having constructors acquire resources and destructors release them is called [RAII](#Rr-raii) ("Resource Acquisitions Is Initialization"). +The idiom of having constructors acquire resources and destructors release them is called [RAII](#Rr-raii) ("Resource Acquisition Is Initialization"). ### C.42: If a constructor cannot construct a valid object, throw an exception @@ -7721,7 +7721,7 @@ This may be seen as an example of the *immediately initialize from input* except Creating optimal and equivalent code from all of these examples should be well within the capabilities of modern C++ compilers (but don't make performance claims without measuring; a compiler may very well not generate optimal code for every example and -there may be language rules preventing some optimization that you would have liked in a particular case).. +there may be language rules preventing some optimization that you would have liked in a particular case). ##### Note @@ -11208,10 +11208,10 @@ Note that `maul()` violates the a `T*` points to an individual object [Rule](#?? vector va = { an_apple, another_apple }; // aa contains Apples (obviously!) - maul2(aa); // error: cannot convert a vector to a Fruit* - maul2(&aa[0]); // you asked for it + maul2(va); // error: cannot convert a vector to a Fruit* + maul2(&va[0]); // you asked for it - Apple& a0 = &aa[0]; // a Pear? + Apple& a0 = &va[0]; // a Pear? Note that the assignment in `maul2()` violated the no-slicing [Rule](#???).