Skip to content

Commit 6388b4d

Browse files
committed
Followup to PR 1564
Changed the two anchors back (anchors need to stay stable and don't display visibly anyway) Switched "non-public" back to hyphernated (to use hyphenation consistently)
1 parent ab0255b commit 6388b4d

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
@@ -4000,7 +4000,7 @@ Class rule summary:
40004000
* [C.4: Make a function a member only if it needs direct access to the representation of a class](#Rc-member)
40014001
* [C.5: Place helper functions in the same namespace as the class they support](#Rc-helper)
40024002
* [C.7: Don't define a class or enum and declare a variable of its type in the same statement](#Rc-standalone)
4003-
* [C.8: Use `class` rather than `struct` if any member is nonpublic](#Rc-class)
4003+
* [C.8: Use `class` rather than `struct` if any member is non-public](#Rc-class)
40044004
* [C.9: Minimize exposure of members](#Rc-private)
40054005

40064006
Subsections:
@@ -4234,7 +4234,7 @@ Mixing a type definition and the definition of another entity in the same declar
42344234

42354235
* Flag if the `}` of a class or enumeration definition is not followed by a `;`. The `;` is missing.
42364236

4237-
### <a name="Rc-class"></a>C.8: Use `class` rather than `struct` if any member is nonpublic
4237+
### <a name="Rc-class"></a>C.8: Use `class` rather than `struct` if any member is non-public
42384238

42394239
##### Reason
42404240

@@ -6896,7 +6896,7 @@ not using this (over)general interface in favor of a particular interface found
68966896
##### Enforcement
68976897

68986898
* Look for classes with lots of members that do nothing but throw.
6899-
* Flag every use of a nonpublic base class `B` where the derived class `D` does not override a virtual function or access a protected member in `B`, and `B` is not one of the following: empty, a template parameter or parameter pack of `D`, a class template specialized with `D`.
6899+
* Flag every use of a non-public base class `B` where the derived class `D` does not override a virtual function or access a protected member in `B`, and `B` is not one of the following: empty, a template parameter or parameter pack of `D`, a class template specialized with `D`.
69006900

69016901
### <a name="Rh-abstract"></a>C.121: If a base class is used as an interface, make it a pure abstract class
69026902

@@ -9952,7 +9952,7 @@ Arithmetic rules:
99529952
* [ES.103: Don't overflow](#Res-overflow)
99539953
* [ES.104: Don't underflow](#Res-underflow)
99549954
* [ES.105: Don't divide by zero](#Res-zero)
9955-
* [ES.106: Don't try to avoid negative values by using `unsigned`](#Res-non-negative)
9955+
* [ES.106: Don't try to avoid negative values by using `unsigned`](#Res-nonnegative)
99569956
* [ES.107: Don't use `unsigned` for subscripts, prefer `gsl::index`](#Res-subscripts)
99579957

99589958
### <a name="Res-lib"></a>ES.1: Prefer the standard library to other libraries and to "handcrafted code"
@@ -13276,7 +13276,7 @@ This also applies to `%`.
1327613276
* Flag division by an integral value that could be zero
1327713277

1327813278

13279-
### <a name="Res-non-negative"></a>ES.106: Don't try to avoid negative values by using `unsigned`
13279+
### <a name="Res-nonnegative"></a>ES.106: Don't try to avoid negative values by using `unsigned`
1328013280

1328113281
##### Reason
1328213282

@@ -16556,7 +16556,7 @@ Template definition rule summary:
1655616556

1655716557
* [T.60: Minimize a template's context dependencies](#Rt-depend)
1655816558
* [T.61: Do not over-parameterize members (SCARY)](#Rt-scary)
16559-
* [T.62: Place non-dependent class template members in a non-templated base class](#Rt-non-dependent)
16559+
* [T.62: Place non-dependent class template members in a non-templated base class](#Rt-nondependent)
1656016560
* [T.64: Use specialization to provide alternative implementations of class templates](#Rt-specialization)
1656116561
* [T.65: Use tag dispatch to provide alternative implementations of functions](#Rt-tag-dispatch)
1656216562
* [T.67: Use specialization to provide alternative implementations for irregular types](#Rt-specialization2)
@@ -17823,7 +17823,7 @@ Some people found the idea that the `Link` no longer was hidden inside the list
1782317823
* Flag member types that do not depend on every template argument
1782417824
* Flag member functions that do not depend on every template argument
1782517825

17826-
### <a name="Rt-non-dependent"></a>T.62: Place non-dependent class template members in a non-templated base class
17826+
### <a name="Rt-nondependent"></a>T.62: Place non-dependent class template members in a non-templated base class
1782717827

1782817828
##### Reason
1782917829

@@ -21994,7 +21994,7 @@ In many cases, holding properly encapsulated resources using RAII "owning" objec
2199421994

2199521995
Prefer compiler-generated (including `=default`) special members; only these can be classified as "trivial", and at least one major standard library vendor heavily optimizes for classes having trivial special members. This is likely to become common practice.
2199621996

21997-
**Exceptions**: When any of the special functions are declared only to make them nonpublic or virtual, but without special semantics, it doesn't imply that the others are needed.
21997+
**Exceptions**: When any of the special functions are declared only to make them non-public or virtual, but without special semantics, it doesn't imply that the others are needed.
2199821998
In rare cases, classes that have members of strange types (such as reference members) are an exception because they have peculiar copy semantics.
2199921999
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.)
2200022000

0 commit comments

Comments
 (0)