Skip to content

Commit 321e411

Browse files
committed
Fix further typographic mistakes
1 parent 6353ff2 commit 321e411

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CppCoreGuidelines.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Editors:
77
* [Bjarne Stroustrup](http://www.stroustrup.com)
88
* [Herb Sutter](http://herbsutter.com/)
99

10-
This document is a very early draft. It is inkorrekt, incompleat, and pµøoorly formatted.
10+
This document is a very early draft. It is inkorrekt, incompleat, and pµÃoorly formatted.
1111
Had it been an open source (code) project, this would have been release 0.6.
1212
Copying, use, modification, and creation of derivative works from this project is licensed under an MIT-style license.
1313
Contributing to this project requires agreeing to a Contributor License. See the accompanying [LICENSE](LICENSE) file for details.
@@ -10275,7 +10275,7 @@ A lot of people, myself included, like to experiment with `std::memory_order`, b
1027510275
Even vendors mess this up: Microsoft had to fix their `shared_ptr` (weak refcount decrement wasn't synchronized-with the destructor, if I recall correctly, although it was only a problem on ARM, not Intel)
1027610276
and everyone (gcc, clang, Microsoft, and Intel) had to fix their `compare_exchange_*` this year, after an implementation bug caused losses to some finance company and they were kind enough to let the community know.
1027710277

10278-
Its worth noting that `volatile` in C++ is not related to concurrency or
10278+
It's worth noting that `volatile` in C++ is not related to concurrency or
1027910279
parallelism in any way. Some languages have chosen to give it threading-related
1028010280
semantics, so programmers familiar with such languages tend to think that the
1028110281
meaning is similar. Sadly, these programmers are mistaken. The C++ standard
@@ -10316,7 +10316,7 @@ Lock-free programming is writing concurrent code without the use of
1031610316
locks. Because there are no locks, lock-free algorithms tend to be far more
1031710317
subtle and error-prone than their locked counterparts. Many operations that are
1031810318
trivial with locking (e.g. deleting a link from a shared linked list) are much
10319-
harder without them (following the example, how do you know youre the *only*
10319+
harder without them (following the example, how do you know you're the *only*
1032010320
thread inspecting that particular link, so you can free it?)
1032110321

1032210322
Because of the added difficulty, expert-level knowledge of many subsystems,
@@ -15155,7 +15155,7 @@ In this rare case, you could make the destructor public and nonvirtual but clear
1515515155

1515615156
In general, however, avoid concrete base classes (see Item 35). For example, `unary_function` is a bundle-of-typedefs that was never intended to be instantiated standalone. It really makes no sense to give it a public destructor; a better design would be to follow this Item's advice and give it a protected nonvirtual destructor.
1515715157

15158-
**References**: [\[C++CS\]](#C++CS) Item 50, [\[Cargill92\]](#Cargill92) pp. 77-79, 207¸ [\[Cline99\]](#Cline99) §21.06, 21.12-13¸ [\[Henricson97\]](#Henricson97) pp. 110-114¸ [\[Koenig97\]](#Koenig97) Chapters 4, 11¸ [\[Meyers97\]](#Meyers97) §14¸ [\[Stroustrup00\]](#Stroustrup00) §12.4.2¸ [\[Sutter02\]](#Sutter02) §27¸ [\[Sutter04\]](#Sutter04) §18
15158+
**References**: [\[C++CS\]](#C++CS) Item 50, [\[Cargill92\]](#Cargill92) pp. 77-79, 207, [\[Cline99\]](#Cline99) §21.06, 21.12-13, [\[Henricson97\]](#Henricson97) pp. 110-114, [\[Koenig97\]](#Koenig97) Chapters 4, 11, [\[Meyers97\]](#Meyers97) §14, [\[Stroustrup00\]](#Stroustrup00) §12.4.2, [\[Sutter02\]](#Sutter02) §27, [\[Sutter04\]](#Sutter04) §18
1515915159

1516015160
### <a name="Sd-noexcept"></a>Discussion: Usage of noexcept
1516115161

@@ -15247,7 +15247,7 @@ Fortunately, when releasing a resource, the scope for failure is definitely smal
1524715247

1524815248
When using exceptions as your error handling mechanism, always document this behavior by declaring these functions `noexcept`. (See Item 75.)
1524915249

15250-
**References**: [\[C++CS\]](#C++CS) Item 51; [\[C++03\]](#C++03) §15.2(3), §17.4.4.8(3)¸ [\[Meyers96\]](#Meyers96) §11¸ [\[Stroustrup00\]](#Stroustrup00) §14.4.7, §E.2-4¸ [\[Sutter00\]](#Sutter00) §8, §16¸ [\[Sutter02\]](#Sutter02) §18-19
15250+
**References**: [\[C++CS\]](#C++CS) Item 51; [\[C++03\]](#C++03) §15.2(3), §17.4.4.8(3), [\[Meyers96\]](#Meyers96) §11, [\[Stroustrup00\]](#Stroustrup00) §14.4.7, §E.2-4, [\[Sutter00\]](#Sutter00) §8, §16, [\[Sutter02\]](#Sutter02) §18-19
1525115251

1525215252
## <a name="Sd-consistent"></a>Define Copy, move, and destroy consistently
1525315253

@@ -15333,7 +15333,7 @@ Prefer compiler-generated (including `=default`) special members; only these can
1533315333
In rare cases, classes that have members of strange types (such as reference members) are an exception because they have peculiar copy semantics.
1533415334
In a class holding a reference, you likely need to write the copy constructor and the assignment operator, but the default destructor already does the right thing. (Note that using a reference member is almost always wrong.)
1533515335

15336-
**References**: [\[C++CS\]](#C++CS) Item 52; [\[Cline99\]](#Cline99) §30.01-14¸ [\[Koenig97\]](#Koenig97) §4¸ [\[Stroustrup00\]](#Stroustrup00) §5.5, §10.4¸ [\[SuttHysl04b\]](#SuttHysl04b)
15336+
**References**: [\[C++CS\]](#C++CS) Item 52; [\[Cline99\]](#Cline99) §30.01-14, [\[Koenig97\]](#Koenig97) §4, [\[Stroustrup00\]](#Stroustrup00) §5.5, §10.4, [\[SuttHysl04b\]](#SuttHysl04b)
1533715337

1533815338
Resource management rule summary:
1533915339

@@ -15592,7 +15592,7 @@ A relatively informal definition of terms used in the guidelines
1559215592
* *executable*: a program ready to be run (executed) on a computer.
1559315593
* *feature creep*: a tendency to add excess functionality to a program "just in case."
1559415594
* *file*: a container of permanent information in a computer.
15595-
* *floating-point number*: a computer's approximation of a real number, such as 7.93 and 10.78e3.
15595+
* *floating-point number*: a computer's approximation of a real number, such as 7.93 and 10.78e-3.
1559615596
* *function*: a named unit of code that can be invoked (called) from different parts of a program; a logical unit of computation.
1559715597
* *generic programming*: a style of programming focused on the design and efficient implementation of algorithms.
1559815598
A generic algorithm will work for all argument types that meet its requirements. In C++, generic programming typically uses templates.
@@ -15609,7 +15609,7 @@ A relatively informal definition of terms used in the guidelines
1560915609
* *information hiding*: the act of separating interface and implementation, thus hiding implementation details not meant for the user's attention and providing an abstraction.
1561015610
* *initialize*: giving an object its first (initial) value.
1561115611
* *input*: values used by a computation (e.g., function arguments and characters typed on a keyboard).
15612-
* *integer*: a whole number, such as 42 and 99.
15612+
* *integer*: a whole number, such as 42 and -99.
1561315613
* *interface*: a declaration or a set of declarations specifying how a piece of code (such as a function or a class) can be called.
1561415614
* *invariant*: something that must be always true at a given point (or points) of a program; typically used to describe the state (set of values) of an object or the state of a loop before entry into the repeated statement.
1561515615
* *iteration*: the act of repeatedly executing a piece of code; see recursion.

0 commit comments

Comments
 (0)