You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CppCoreGuidelines.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Editors:
7
7
* [Bjarne Stroustrup](http://www.stroustrup.com)
8
8
* [Herb Sutter](http://herbsutter.com/)
9
9
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.
11
11
Had it been an open source (code) project, this would have been release 0.6.
12
12
Copying, use, modification, and creation of derivative works from this project is licensed under an MIT-style license.
13
13
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
10275
10275
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)
10276
10276
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.
10277
10277
10278
-
It’s 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
10279
10279
parallelism in any way. Some languages have chosen to give it threading-related
10280
10280
semantics, so programmers familiar with such languages tend to think that the
10281
10281
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
10316
10316
locks. Because there are no locks, lock-free algorithms tend to be far more
10317
10317
subtle and error-prone than their locked counterparts. Many operations that are
10318
10318
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 you’re the *only*
10319
+
harder without them (following the example, how do you know you're the *only*
10320
10320
thread inspecting that particular link, so you can free it?)
10321
10321
10322
10322
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
15155
15155
15156
15156
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.
## <a name="Sd-consistent"></a>Define Copy, move, and destroy consistently
15253
15253
@@ -15333,7 +15333,7 @@ Prefer compiler-generated (including `=default`) special members; only these can
15333
15333
In rare cases, classes that have members of strange types (such as reference members) are an exception because they have peculiar copy semantics.
15334
15334
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.)
@@ -15592,7 +15592,7 @@ A relatively informal definition of terms used in the guidelines
15592
15592
* *executable*: a program ready to be run (executed) on a computer.
15593
15593
* *feature creep*: a tendency to add excess functionality to a program "just in case."
15594
15594
* *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.78e–3.
15595
+
* *floating-point number*: a computer's approximation of a real number, such as 7.93 and 10.78e-3.
15596
15596
* *function*: a named unit of code that can be invoked (called) from different parts of a program; a logical unit of computation.
15597
15597
* *generic programming*: a style of programming focused on the design and efficient implementation of algorithms.
15598
15598
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
15609
15609
* *information hiding*: the act of separating interface and implementation, thus hiding implementation details not meant for the user's attention and providing an abstraction.
15610
15610
* *initialize*: giving an object its first (initial) value.
15611
15611
* *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.
15613
15613
* *interface*: a declaration or a set of declarations specifying how a piece of code (such as a function or a class) can be called.
15614
15614
* *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.
15615
15615
* *iteration*: the act of repeatedly executing a piece of code; see recursion.
0 commit comments