mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
minor docs improvements (#1097)
- Capitalize inital letter (make both tables consistent) - Add links to docs/headers.md - Latest cmake requirement is 3.14 - Mark text as code
This commit is contained in:
parent
78eb6ca145
commit
9f85e4e088
50
README.md
50
README.md
@ -25,11 +25,11 @@ This project makes use of the [Google Test](https://github.com/google/googletest
|
||||
Feature | Supported? | Description
|
||||
-------------------------------------------------------------------------|:----------:|-------------
|
||||
[**1. Views**][cg-views] | |
|
||||
[owner](docs/headers.md#user-content-H-pointers-owner) | ☑ | an alias for a raw pointer
|
||||
[not_null](docs/headers.md#user-content-H-pointers-not_null) | ☑ | restricts a pointer / smart pointer to hold non-null values
|
||||
span | ☑ | a view over a contiguous sequence of memory. Based on the standardized version of `std::span`, however `gsl::span` enforces bounds checking. See the [wiki](https://github.com/microsoft/GSL/wiki/gsl::span-and-std::span) for additional information.
|
||||
span_p | ☐ | spans a range starting from a pointer to the first place for which the predicate is true
|
||||
basic_zstring | ☑ | A pointer to a C-string (zero-terminated array) with a templated char type
|
||||
[owner](docs/headers.md#user-content-H-pointers-owner) | ☑ | An alias for a raw pointer
|
||||
[not_null](docs/headers.md#user-content-H-pointers-not_null) | ☑ | Restricts a pointer / smart pointer to hold non-null values
|
||||
[span](docs/headers.md#user-content-H-span-span) | ☑ | A view over a contiguous sequence of memory. Based on the standardized version of `std::span`, however `gsl::span` enforces bounds checking.
|
||||
span_p | ☐ | Spans a range starting from a pointer to the first place for which the predicate is true
|
||||
[basic_zstring](docs/headers.md#user-content-H-string_span) | ☑ | A pointer to a C-string (zero-terminated array) with a templated char type
|
||||
[zstring](docs/headers.md#user-content-H-string_span) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char
|
||||
[czstring](docs/headers.md#user-content-H-string_span) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char
|
||||
[wzstring](docs/headers.md#user-content-H-string_span) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of wchar_t
|
||||
@ -39,25 +39,25 @@ basic_zstring | &
|
||||
[u32zstring](docs/headers.md#user-content-H-string_span) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char32_t
|
||||
[cu32zstring](docs/headers.md#user-content-H-string_span) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char32_t
|
||||
[**2. Owners**][cg-owners] | |
|
||||
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr) | ☑ | an alias to `std::unique_ptr`
|
||||
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr) | ☑ | an alias to `std::shared_ptr`
|
||||
stack_array | ☐ | a stack-allocated array
|
||||
dyn_array | ☐ | a heap-allocated array
|
||||
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr) | ☑ | An alias to `std::unique_ptr`
|
||||
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr) | ☑ | An alias to `std::shared_ptr`
|
||||
stack_array | ☐ | A stack-allocated array
|
||||
dyn_array | ☐ | A heap-allocated array
|
||||
[**3. Assertions**][cg-assertions] | |
|
||||
[Expects](docs/headers.md#user-content-H-assert-expects) | ☑ | a precondition assertion; on failure it terminates
|
||||
[Ensures](docs/headers.md#user-content-H-assert-ensures) | ☑ | a postcondition assertion; on failure it terminates
|
||||
[Expects](docs/headers.md#user-content-H-assert-expects) | ☑ | A precondition assertion; on failure it terminates
|
||||
[Ensures](docs/headers.md#user-content-H-assert-ensures) | ☑ | A postcondition assertion; on failure it terminates
|
||||
[**4. Utilities**][cg-utilities] | |
|
||||
move_owner | ☐ | a helper function that moves one `owner` to the other
|
||||
[byte](docs/headers.md#user-content-H-byte-byte) | ☑ | either an alias to `std::byte` or a byte type
|
||||
[final_action](docs/headers.md#user-content-H-util-final_action) | ☑ | a RAII style class that invokes a functor on its destruction
|
||||
[finally](docs/headers.md#user-content-H-util-finally) | ☑ | a helper function instantiating `final_action`
|
||||
[GSL_SUPPRESS](docs/headers.md#user-content-H-assert-gsl_suppress) | ☑ | a macro that takes an argument and turns it into `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
|
||||
[[implicit]] | ☐ | a "marker" to put on single-argument constructors to explicitly make them non-explicit
|
||||
[index](docs/headers.md#user-content-H-util-index) | ☑ | a type to use for all container and array indexing (currently an alias for `std::ptrdiff_t`)
|
||||
joining_thread | ☐ | a RAII style version of `std::thread` that joins
|
||||
[narrow](docs/headers.md#user-content-H-narrow-narrow) | ☑ | a checked version of `narrow_cast`; it can throw `narrowing_error`
|
||||
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast) | ☑ | a narrowing cast for values and a synonym for `static_cast`
|
||||
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) | ☑ | a custom exception type thrown by `narrow()`
|
||||
move_owner | ☐ | A helper function that moves one `owner` to the other
|
||||
[byte](docs/headers.md#user-content-H-byte-byte) | ☑ | Either an alias to `std::byte` or a byte type
|
||||
[final_action](docs/headers.md#user-content-H-util-final_action) | ☑ | A RAII style class that invokes a functor on its destruction
|
||||
[finally](docs/headers.md#user-content-H-util-finally) | ☑ | A helper function instantiating `final_action`
|
||||
[GSL_SUPPRESS](docs/headers.md#user-content-H-assert-gsl_suppress) | ☑ | A macro that takes an argument and turns it into `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
|
||||
[[implicit]] | ☐ | A "marker" to put on single-argument constructors to explicitly make them non-explicit
|
||||
[index](docs/headers.md#user-content-H-util-index) | ☑ | A type to use for all container and array indexing (currently an alias for `std::ptrdiff_t`)
|
||||
joining_thread | ☐ | A RAII style version of `std::thread` that joins
|
||||
[narrow](docs/headers.md#user-content-H-narrow-narrow) | ☑ | A checked version of `narrow_cast`; it can throw `narrowing_error`
|
||||
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast) | ☑ | A narrowing cast for values and a synonym for `static_cast`
|
||||
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) | ☑ | A custom exception type thrown by `narrow()`
|
||||
[**5. Concepts**][cg-concepts] | ☐ |
|
||||
|
||||
## The following features do not exist in or have been removed from the C++ Core Guidelines:
|
||||
@ -121,11 +121,11 @@ Note: These CI/CD steps are run with each pull request, however failures in them
|
||||
## Building the tests
|
||||
To build the tests, you will require the following:
|
||||
|
||||
* [CMake](http://cmake.org), version 3.8 or later to be installed and in your PATH.
|
||||
* [CMake](http://cmake.org), version 3.14 or later to be installed and in your PATH.
|
||||
|
||||
These steps assume the source code of this repository has been cloned into a directory named `c:\GSL`.
|
||||
|
||||
1. Create a directory to contain the build outputs for a particular architecture (we name it c:\GSL\build-x86 in this example).
|
||||
1. Create a directory to contain the build outputs for a particular architecture (we name it `c:\GSL\build-x86` in this example).
|
||||
|
||||
cd GSL
|
||||
md build-x86
|
||||
@ -217,4 +217,4 @@ target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
|
||||
For Visual Studio users, the file [GSL.natvis](./GSL.natvis) in the root directory of the repository can be added to your project if you would like more helpful visualization of GSL types in the Visual Studio debugger than would be offered by default.
|
||||
|
||||
If you are using CMake this will be done automatically for you.
|
||||
See 'GSL_VS_ADD_NATIVE_VISUALIZERS'
|
||||
See `GSL_VS_ADD_NATIVE_VISUALIZERS`
|
||||
|
Loading…
Reference in New Issue
Block a user