Skip to content

Commit 5ca9c77

Browse files
maflckoMarcoFalke
andauthored
doc: Fix to use lower-case anchors in links to C++ Core Guidelines (#1234)
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
1 parent bf9d5e1 commit 5ca9c77

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/headers.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ The Guidelines Support Library (GSL) interface is very lightweight and exposed v
22

33
Types and functions are exported in the namespace `gsl`.
44

5-
See [GSL: Guidelines support library](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-gsl)
5+
See [GSL: Guidelines support library](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#s-gsl)
66

77
# <a name="H" />Headers
88

@@ -38,7 +38,7 @@ that the destination `span` is at least as large as the source `span`.
3838
3939
This header contains some macros used for contract checking and suppressing code analysis warnings.
4040
41-
See [GSL.assert: Assertions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-assertions)
41+
See [GSL.assert: Assertions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-assertions)
4242
4343
- [`GSL_SUPPRESS`](#user-content-H-assert-gsl_suppress)
4444
- [`Expects`](#user-content-H-assert-expects)
@@ -86,7 +86,7 @@ If `GSL_USE_STD_BYTE` is not defined, then the header file will check if `std::b
8686
If you do so, you might want to `#define GSL_USE_STD_BYTE 0` to a fixed value to be sure that both projects use exactly
8787
the same type. Otherwise you might get linker errors.
8888
89-
See [SL.str.5: Use `std::byte` to refer to byte values that do not necessarily represent characters](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rstr-byte)
89+
See [SL.str.5: Use `std::byte` to refer to byte values that do not necessarily represent characters](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rstr-byte)
9090
9191
### Non-member functions
9292
@@ -164,7 +164,7 @@ Since `<narrow>` requires exceptions, it will only be included if exceptions are
164164

165165
This header contains utility functions and classes, for narrowing casts, which require exceptions. The narrowing-related utilities that don't require exceptions are found inside [util](#user-content-H-util).
166166

167-
See [GSL.util: Utilities](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-utilities)
167+
See [GSL.util: Utilities](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-utilities)
168168

169169
- [`gsl::narrowing_error`](#user-content-H-narrow-narrowing_error)
170170
- [`gsl::narrow`](#user-content-H-narrow-narrow)
@@ -180,13 +180,13 @@ If the argument `x` cannot be represented in the target type `T`, then the funct
180180

181181
Note: compare [`gsl::narrow_cast`](#user-content-H-util-narrow_cast) in header [util](#user-content-H-util).
182182

183-
See [ES.46: Avoid lossy (narrowing, truncating) arithmetic conversions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-narrowing) and [ES.49: If you must use a cast, use a named cast](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts-named)
183+
See [ES.46: Avoid lossy (narrowing, truncating) arithmetic conversions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-narrowing) and [ES.49: If you must use a cast, use a named cast](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-casts-named)
184184

185185
## <a name="H-pointers" />`<pointers>`
186186

187187
This header contains some pointer types.
188188

189-
See [GSL.view](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-views)
189+
See [GSL.view](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-views)
190190

191191
- [`gsl::unique_ptr`](#user-content-H-pointers-unique_ptr)
192192
- [`gsl::shared_ptr`](#user-content-H-pointers-shared_ptr)
@@ -198,13 +198,13 @@ See [GSL.view](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-v
198198

199199
`gsl::unique_ptr` is an alias to `std::unique_ptr`.
200200

201-
See [GSL.owner: Ownership pointers](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-ownership)
201+
See [GSL.owner: Ownership pointers](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-ownership)
202202

203203
### <a name="H-pointers-shared_ptr" />`gsl::shared_ptr`
204204

205205
`gsl::shared_ptr` is an alias to `std::shared_ptr`.
206206

207-
See [GSL.owner: Ownership pointers](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-ownership)
207+
See [GSL.owner: Ownership pointers](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-ownership)
208208

209209
### <a name="H-pointers-owner" />`gsl::owner`
210210

@@ -213,7 +213,7 @@ See [GSL.owner: Ownership pointers](https://isocpp.github.io/CppCoreGuidelines/C
213213

214214
A `gsl::owner<T>` is a typedef to `T`. It adds no runtime overhead whatsoever, as it is purely syntactic and does not add any runtime checks. Instead, it serves as an annotation for static analysis tools which check for memory safety, and as a code comprehension guide for human readers.
215215

216-
See Enforcement section of [C.31: All resources acquired by a class must be released by the class’s destructor](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor-release).
216+
See Enforcement section of [C.31: All resources acquired by a class must be released by the class’s destructor](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rc-dtor-release).
217217

218218
### <a name="H-pointers-not_null" />`gsl::not_null`
219219

@@ -222,7 +222,7 @@ See Enforcement section of [C.31: All resources acquired by a class must be rele
222222
The checks for ensuring that the pointer is not null are done in the constructor. There is no overhead when retrieving or dereferencing the checked pointer.
223223
When a nullptr check fails, `std::terminate` is called.
224224

225-
See [F.23: Use a `not_null<T>` to indicate that “null” is not a valid value](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-nullptr)
225+
See [F.23: Use a `not_null<T>` to indicate that “null” is not a valid value](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rf-nullptr)
226226

227227
#### Member Types
228228

@@ -278,7 +278,7 @@ not_null& operator+=(std::ptrdiff_t) = delete;
278278
not_null& operator-=(std::ptrdiff_t) = delete;
279279
```
280280

281-
Explicitly deleted operators. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ri-array)), so don't allow these operators.
281+
Explicitly deleted operators. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ri-array)), so don't allow these operators.
282282

283283
##### Observers
284284

@@ -300,7 +300,7 @@ Dereference the underlying pointer.
300300
void operator[](std::ptrdiff_t) const = delete;
301301
```
302302

303-
Array index operator is explicitly deleted. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ri-array)), so don't allow treating them as an array.
303+
Array index operator is explicitly deleted. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ri-array)), so don't allow treating them as an array.
304304

305305
```cpp
306306
void swap(not_null<T>& other) { std::swap(ptr_, other.ptr_); }
@@ -375,7 +375,7 @@ template <class T>
375375
not_null<T> operator+(std::ptrdiff_t, const not_null<T>&) = delete;
376376
```
377377
378-
Addition and subtraction are explicitly deleted. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ri-array)), so don't allow these operators.
378+
Addition and subtraction are explicitly deleted. Pointers point to single objects ([I.13: Do not pass an array as a single pointer](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ri-array)), so don't allow these operators.
379379
380380
##### STL integration
381381
@@ -784,14 +784,14 @@ that a pointer points to a zero terminated C style string. This helps static cod
784784
`u32zstring` is a zero terminated `char32_t` string.
785785
`cu32zstring` is a const zero terminated `char32_t` string.
786786

787-
See [GSL.view](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-views) and [SL.str.3: Use zstring or czstring to refer to a C-style, zero-terminated, sequence of characters](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rstr-zstring).
787+
See [GSL.view](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-views) and [SL.str.3: Use zstring or czstring to refer to a C-style, zero-terminated, sequence of characters](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rstr-zstring).
788788

789789
## <a name="H-util" />`<util>`
790790

791791
This header contains utility functions and classes. This header works without exceptions being available. The parts that require
792792
exceptions being available are in their own header file [narrow](#user-content-H-narrow).
793793

794-
See [GSL.util: Utilities](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-utilities)
794+
See [GSL.util: Utilities](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#ss-utilities)
795795

796796
- [`gsl::narrow_cast`](#user-content-H-util-narrow_cast)
797797
- [`gsl::final_action`](#user-content-H-util-final_action)
@@ -807,7 +807,7 @@ An alias to `std::ptrdiff_t`. It serves as the index type for all container inde
807807

808808
Note: compare the throwing version [`gsl::narrow`](#user-content-H-narrow-narrow) in header [narrow](#user-content-H-narrow).
809809

810-
See [ES.46: Avoid lossy (narrowing, truncating) arithmetic conversions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-narrowing) and [ES.49: If you must use a cast, use a named cast](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts-named)
810+
See [ES.46: Avoid lossy (narrowing, truncating) arithmetic conversions](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-narrowing) and [ES.49: If you must use a cast, use a named cast](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-casts-named)
811811

812812
### <a name="H-util-final_action" />`gsl::final_action`
813813

@@ -818,7 +818,7 @@ class final_action { ... };
818818
819819
`final_action` allows you to ensure something gets run at the end of a scope.
820820
821-
See [E.19: Use a final_action object to express cleanup if no suitable resource handle is available](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Re-finally)
821+
See [E.19: Use a final_action object to express cleanup if no suitable resource handle is available](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#re-finally)
822822
823823
#### Member functions
824824
@@ -858,7 +858,7 @@ The function `gsl::at` offers a safe way to access data with index bounds checki
858858

859859
Note: `gsl::at` supports indexes up to `PTRDIFF_MAX`.
860860

861-
See [ES.42: Keep use of pointers simple and straightforward](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-ptr)
861+
See [ES.42: Keep use of pointers simple and straightforward](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-ptr)
862862

863863
```cpp
864864
template <class T, std::size_t N>

0 commit comments

Comments
 (0)