1
0
mirror of https://github.com/microsoft/GSL.git synced 2025-04-07 19:08:34 -04:00

10 Commits

Author SHA1 Message Date
Werner Henze
fcd55ee924
Better use of std::enable_if ()
* this commits adds tests that should fail, but don't

* Better use of std::enable_if

Replace the occurances of `class = std::enable_if_t<Cond>` and `typename = std::enable_if_t<Cond>` that have been identified in the previous commit with `std::enable_if_t<Cond, bool> = true`.

This commit is inspired by , which changed one occurance in the owner header. This commit is aimed to fix all remaining occurances.

* fix failing checks

- core.cxx_gsl aktualisiert auf [](https://gitlab.avm.de/fos/repos/core.cxx_gsl/-/commit/)
- plc.access_lib aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.access_lib/-/commit/)
- plc.common aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.common/-/commit/)
- plc.daemon aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.daemon/-/commit/)
-

Test Plan:
-

---------

Co-authored-by: Werner Henze <werner.henze+gitcommits@posteo.de>
Co-authored-by: Werner Henze <w.henze@avm.de>
2024-12-23 10:40:22 -06:00
Carson Radtke
272463043e
introduce gsl::swap for swapping gsl::not_null ()
fixes: https://github.com/microsoft/GSL/issues/1129

* create gsl::swap<T>(T&, T&) which wraps std::swap
* specialize gsl::swap<T>(gsl::not_null<T>&, gsl::not_null<T>&)
* add tests
2024-12-13 15:16:53 -06:00
Werner Henze
b39e7e4b09
Add documentation for to_integer(byte) ()
Co-authored-by: Werner Henze <w.henze@avm.de>
2024-02-26 13:23:45 -08:00
Bruce Mitchener
caae4dd0f8
Fix some typos. () 2024-02-21 15:06:29 -08:00
Werner Henze
9695da9b38
fix and optimize documentation ()
- Add anchor for `finally` in `headers.md` so that the link in `README.md` can work
- In `README.md` add code formatting for the character types of the `zstring` and `string_span` types
- In `README.md` change code formatting to links for GSL types
- Vertical alignment
2023-09-05 16:08:36 -07:00
Dmitry Kobets
3549e31ba4
Deprecate <gsl/string_span> and replace with <gsl/zstring> ()
With `string_span` having been deprecated (https://github.com/microsoft/GSL/pull/931, https://github.com/microsoft/GSL/pull/945) and removed (https://github.com/microsoft/GSL/pull/1074), the header `<gsl/string_span>` now only contains the definitions for the `zstring` family. Update the name accordingly from `<gsl/string_span>` to `<gsl/zstring>`. The old header is now deprecated and should no longer be used and will be removed in some future release.
2023-06-28 10:48:23 -07:00
dmitrykobets-msft
78eb6ca145
Document span_ext ()
`<gsl/span>` is intended to mirror `<span>` in the STL. `<span_ext>` provides convenience features that aren't part of `<span>`.
Address 
2023-02-23 10:22:02 -08:00
Werner Henze
7f7108a076
Better links to CoreGuidelines ()
The `#i13-do-not-pass-an-array-as-a-single-pointer` anchor seems to be auto generated based on the title of the section. The `#Ri-array` anchor is explicitely written in the source, so this should be a better link.
2023-02-21 17:11:30 -08:00
Werner Henze
7a297d4283
Extend docs and tests for span ctor () 2023-02-21 15:46:40 -08:00
Werner Henze
743939744c
Documentation ()
Add documentation for .
2023-02-17 10:38:34 -08:00