Skip to content

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

Merged
carsonRadtke merged 3 commits into
microsoft:mainfrom
carsonRadtke:gsl-null-element-type
Feb 12, 2025
Merged

introduce gsl::not_null<T>::element_type#1196
carsonRadtke merged 3 commits into
microsoft:mainfrom
carsonRadtke:gsl-null-element-type

Conversation

@carsonRadtke

Copy link
Copy Markdown
Member

fixes: #1186

@carsonRadtke carsonRadtke merged commit ec729d6 into microsoft:main Feb 12, 2025
@carsonRadtke carsonRadtke deleted the gsl-null-element-type branch February 12, 2025 15:16
@beinhaerter

Copy link
Copy Markdown
Contributor

The commit message contains
"* use std::is_same instead of is_same_v

  • fix: cannot put a non-pointer in a gsl::not_null"

Both is nothing that this merge request changed.

Comment thread docs/headers.md
using element_type = T;
```

The type of the pointed-to object.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. T is a raw pointer or a smart pointer, but not the type of the pointed to object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add element_type to not_null

2 participants