From b02c9a28fbb3aa8d28f847bb44ad3182cc23ad31 Mon Sep 17 00:00:00 2001 From: David McCortney Date: Mon, 21 Sep 2015 22:11:31 -0400 Subject: [PATCH] Fix some minor spelling errors. It is easier to see this commit with the following command. git --no-pager diff --unified=0 --word-diff-regex=. --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e5b15cb..d199ac1 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1467,7 +1467,7 @@ Use `const` for the "from" argument: void copy_n(const T* p, T* q, int n); // copy from [p:p+n) to [q:q+n) -**Alternative**: Don't pass arrays as pointers, pass an object representing a rage (e.g., an `array_view`): +**Alternative**: Don't pass arrays as pointers, pass an object representing a range (e.g., an `array_view`): void copy_n(array_view p, array_view q); // copy from b to q @@ -8023,7 +8023,7 @@ Libraries using threads my be used from some other part of the program. **Exception**: There are examples where code will never be run in a multi-threaded environment. However, here are also many examples where code that was "known" to never run in a multi-threaded program was run as part of a multi-threaded program. Often years later. -Typically, such programs leads to a painful efford to remove data races. +Typically, such programs leads to a painful effort to remove data races. ### CP.2: Avoid data races @@ -10271,7 +10271,7 @@ It provides better support for high-level programming and often generates faster **Reason**: C++ is more expressive than C and offer better support for many types of programming. **Example**: For example, to use a 3rd party C library or C systems interface, define the low-level interface in the common subset of C and C++ for better type checking. -Whenever possible encapsulate the low-level interface in an interface that follows the C++ guidelines (for better abstraction, memory safety, and resource safety) and use that C++ inerface in C++ code. +Whenever possible encapsulate the low-level interface in an interface that follows the C++ guidelines (for better abstraction, memory safety, and resource safety) and use that C++ interface in C++ code. **Example**: You can call C from C++: