Skip to content

Commit ab91388

Browse files
authored
fix mismatched anchors, closes #1569 (#1581)
1 parent aea393c commit ab91388

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

CppCoreGuidelines.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ We don't consider "performance" a valid reason not to use exceptions.
18231823

18241824
* Often, explicit error checking and handling consume as much time and space as exception handling.
18251825
* Often, cleaner code yields better performance with exceptions (simplifying the tracing of paths through the program and their optimization).
1826-
* A good rule for performance critical code is to move checking outside the critical part of the code ([checking](#Rper-checking)).
1826+
* A good rule for performance critical code is to move checking outside the [critical](#Rper-critical) part of the code.
18271827
* In the longer term, more regular code gets better optimized.
18281828
* Always carefully [measure](#Rper-measure) before making performance claims.
18291829

@@ -1982,7 +1982,7 @@ This `draw2()` passes the same amount of information to `draw()`, but makes the
19821982
##### Exception
19831983

19841984
Use `zstring` and `czstring` to represent C-style, zero-terminated strings.
1985-
But when doing so, use `std::string_view` or `string_span` from the [GSL](#GSL) to prevent range errors.
1985+
But when doing so, use `std::string_view` or `string_span` from the [GSL](#S-gsl) to prevent range errors.
19861986

19871987
##### Enforcement
19881988

@@ -12316,7 +12316,7 @@ This is a major part of the discussion of [C++'s model for type- and resource-sa
1231612316
* Use [unique_ptr](#Rf-unique_ptr) to avoid lifetime problems.
1231712317
* Use [shared_ptr](#Rf-shared_ptr) to avoid lifetime problems.
1231812318
* Use [references](#Rf-ptr-ref) when `nullptr` isn't a possibility.
12319-
* Use [not_null](#Rf-not_null) to catch unexpected `nullptr` early.
12319+
* Use [not_null](#Rf-nullptr) to catch unexpected `nullptr` early.
1232012320
* Use the [bounds profile](#SS-bounds) to avoid range errors.
1232112321

1232212322

@@ -16536,8 +16536,8 @@ Concept definition rule summary:
1653616536
* [T.24: Use tag classes or traits to differentiate concepts that differ only in semantics](#Rt-tag)
1653716537
* [T.25: Avoid complementary constraints](#Rt-not)
1653816538
* [T.26: Prefer to define concepts in terms of use-patterns rather than simple syntax](#Rt-use)
16539-
* [T.30: Use concept negation (`!C<T>`) sparingly to express a minor difference](#Rt-not)
16540-
* [T.31: Use concept disjunction (`C1<T> || C2<T>`) sparingly to express alternatives](#Rt-or)
16539+
* [T.30: Use concept negation (`!C<T>`) sparingly to express a minor difference](#Rt-???)
16540+
* [T.31: Use concept disjunction (`C1<T> || C2<T>`) sparingly to express alternatives](#Rt-???)
1654116541
* ???
1654216542

1654316543
Template interface rule summary:
@@ -16798,7 +16798,7 @@ See the reference to more specific rules.
1679816798
## <a name="SS-concepts"></a>T.concepts: Concept rules
1679916799

1680016800
Concepts is a facility for specifying requirements for template arguments.
16801-
It is an [ISO Technical Specification](#Ref-conceptsTS), but currently supported only by GCC.
16801+
It is an [ISO Technical Specification](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4553.pdf), but currently supported only by GCC.
1680216802
Concepts are, however, crucial in the thinking about generic programming and the basis of much work on future C++ libraries
1680316803
(standard and other).
1680416804

@@ -16885,7 +16885,7 @@ Flag template type arguments without concepts
1688516885

1688616886
##### Reason
1688716887

16888-
"Standard" concepts (as provided by the [GSL](#S-GSL) and the [Ranges TS](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4569.pdf), and hopefully soon the ISO standard itself)
16888+
"Standard" concepts (as provided by the [GSL](#S-gsl) and the [Ranges TS](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4569.pdf), and hopefully soon the ISO standard itself)
1688916889
save us the work of thinking up our own concepts, are better thought out than we can manage to do in a hurry, and improve interoperability.
1689016890

1689116891
##### Note
@@ -17682,7 +17682,7 @@ Because that's the best we can do without direct concept support.
1768217682

1768317683
##### Note
1768417684

17685-
Beware of [complementary constraints](# T.25).
17685+
Beware of [complementary constraints](#Rt-not).
1768617686
Faking concept overloading using `enable_if` sometimes forces us to use that error-prone design technique.
1768717687

1768817688
##### Enforcement
@@ -18031,7 +18031,7 @@ or a traditional traits template to be specialized on the user's type.
1803118031
If you intend to call your own helper function `helper(t)` with a value `t` that depends on a template type parameter,
1803218032
put it in a `::detail` namespace and qualify the call as `detail::helper(t);`.
1803318033
An unqualified call becomes a customization point where any function `helper` in the namespace of `t`'s type can be invoked;
18034-
this can cause problems like [unintentionally invoking unconstrained function templates](#Rt-unconstrained-adl).
18034+
this can cause problems like [unintentionally invoking unconstrained function templates](#Rt-visible).
1803518035

1803618036

1803718037
##### Enforcement
@@ -20654,13 +20654,13 @@ Type safety profile summary:
2065420654
* <a name="Pro-type-constcast"></a>Type.3: Don't use `const_cast` to cast away `const` (i.e., at all):
2065520655
[Don't cast away const](#Res-casts-const).
2065620656
* <a name="Pro-type-cstylecast"></a>Type.4: Don't use C-style `(T)expression` or functional `T(expression)` casts:
20657-
Prefer [construction](#Res-construct) or [named casts](#Res-cast-named).
20657+
Prefer [construction](#Res-construct) or [named casts](#Res-casts-named).
2065820658
* <a name="Pro-type-init"></a>Type.5: Don't use a variable before it has been initialized:
2065920659
[always initialize](#Res-always).
2066020660
* <a name="Pro-type-memberinit"></a>Type.6: Always initialize a member variable:
2066120661
[always initialize](#Res-always),
2066220662
possibly using [default constructors](#Rc-default0) or
20663-
[default member initializers](#Rc-in-class-initializers).
20663+
[default member initializers](#Rc-in-class-initializer).
2066420664
* <a name="Pro-type-unon"></a>Type.7: Avoid naked union:
2066520665
[Use `variant` instead](#Ru-naked).
2066620666
* <a name="Pro-type-varargs"></a>Type.8: Avoid varargs:
@@ -22481,6 +22481,10 @@ Alternatively, we will decide that no change is needed and delete the entry.
2248122481
\[Meyers96]: S. Meyers. More Effective C++ (Addison-Wesley, 1996).
2248222482
* <a name="Meyers97"></a>
2248322483
\[Meyers97]: S. Meyers. Effective C++ (2nd Edition) (Addison-Wesley, 1997).
22484+
* <a name="Meyers01"></a>
22485+
\[Meyers01]: S. Meyers. Effective STL (Addison-Wesley, 2001).
22486+
* <a name="Meyers05"></a>
22487+
\[Meyers05]: S. Meyers. Effective C++ (3rd Edition) (Addison-Wesley, 2005).
2248422488
* <a name="Meyers15"></a>
2248522489
\[Meyers15]: S. Meyers. Effective Modern C++ (O'Reilly, 2015).
2248622490
* <a name="Murray93"></a>

0 commit comments

Comments
 (0)