You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* deprecated features adopted into C++
1) Mark the following GSL features as deprecated:
- gsl::unique_ptr (always)
- gsl::shared_ptr (always)
- gsl::byte (since c++17)
- gsl::joining_thread (never implemented)
2) Refactor existing deprecations to use the new GSL_DEPRECATED(msg) macro.
3) Create a section in the README for deprecated features in the
standard.
* do not deprecate gsl::to_integer because we never claim to implement it.
* do not use gsl::byte if it is deprecated
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,22 +40,18 @@ span_p | &
40
40
[u32zstring](docs/headers.md#user-content-H-zstring) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of `char32_t`
41
41
[cu32zstring](docs/headers.md#user-content-H-zstring) | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of `const char32_t`
42
42
[**2. Owners**][cg-owners] | |
43
-
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr) | ☑ | An alias to `std::unique_ptr`
44
-
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr) | ☑ | An alias to `std::shared_ptr`
45
43
stack_array | ☐ | A stack-allocated array
46
44
dyn_array | ☐ | A heap-allocated array
47
45
[**3. Assertions**][cg-assertions] | |
48
46
[Expects](docs/headers.md#user-content-H-assert-expects) | ☑ | A precondition assertion; on failure it terminates
49
47
[Ensures](docs/headers.md#user-content-H-assert-ensures) | ☑ | A postcondition assertion; on failure it terminates
50
48
[**4. Utilities**][cg-utilities] | |
51
49
move_owner | ☐ | A helper function that moves one `owner` to the other
52
-
[byte](docs/headers.md#user-content-H-byte-byte) | ☑ | Either an alias to `std::byte` or a byte type
53
50
[final_action](docs/headers.md#user-content-H-util-final_action) | ☑ | A RAII style class that invokes a functor on its destruction
54
51
[finally](docs/headers.md#user-content-H-util-finally) | ☑ | A helper function instantiating [final_action](docs/headers.md#user-content-H-util-final_action)
55
52
[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")]]`
56
53
[[implicit]] | ☐ | A "marker" to put on single-argument constructors to explicitly make them non-explicit
57
54
[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`)
58
-
joining_thread | ☐ | A RAII style version of `std::thread` that joins
59
55
[narrow](docs/headers.md#user-content-H-narrow-narrow) | ☑ | A checked version of `narrow_cast`; it can throw [narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error)
60
56
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast) | ☑ | A narrowing cast for values and a synonym for `static_cast`
61
57
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) | ☑ | A custom exception type thrown by [narrow](docs/headers.md#user-content-H-narrow-narrow)
@@ -77,6 +73,14 @@ cu16string_span | ☐ | Deprecated. An alias to `basic
77
73
u32string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of `char32_t`
78
74
cu32string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of `const char32_t`
79
75
76
+
## The following features have been adopted by WG21. They are deprecated in GSL.
gsl::unique_ptr | C++11 | Use std::unique_ptr instead.
80
+
gsl::shared_ptr | C++11 | Use std::shared_ptr instead.
81
+
gsl::byte | C++17 | Use std::byte instead.
82
+
gsl:joining_thread | C++20 (Note: Not yet implemented in GSL) | Use std::jthread instead.
83
+
80
84
This is based on [CppCoreGuidelines semi-specification](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guidelines-support-library).
0 commit comments