introduce gsl::not_null<T>::element_type (#1196)

* introduce gsl::not_null<T>::element_type

* use std::is_same instead of is_same_v

* fix: cannot put a non-pointer in a gsl::not_null
This commit is contained in:
Carson Radtke
2025-02-12 09:16:05 -06:00
committed by GitHub
parent 7f4fc9388b
commit ec729d63a7
4 changed files with 23 additions and 0 deletions
+8
View File
@@ -224,6 +224,14 @@ When a nullptr check fails, `std::terminate` is called.
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)
#### Member Types
```cpp
using element_type = T;
```
The type of the pointed-to object.
#### Member functions
##### Construct/Copy