Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only enable std::hash<gsl::not_null<T>> if std::hash<T> is enabled. #1109

Merged

Conversation

dmitrykobets-msft
Copy link
Member

@dmitrykobets-msft dmitrykobets-msft commented May 4, 2023

Disable std::hash<gsl::not_null<T>> if std::hash<T> is not enabled.
Resolves #914

include/gsl/pointers Outdated Show resolved Hide resolved
include/gsl/pointers Outdated Show resolved Hide resolved
dmitrykobets-msft and others added 2 commits May 5, 2023 18:01
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
@dmitrykobets-msft dmitrykobets-msft changed the title [default ctor] Only enable std::hash<gsl::not_null<T>> if std::hash<T> is enabled. Only enable std::hash<gsl::not_null<T>> if std::hash<T> is enabled. May 9, 2023
@dmitrykobets-msft dmitrykobets-msft marked this pull request as ready for review May 9, 2023 20:20
@dmitrykobets-msft dmitrykobets-msft merged commit 4b5b5a1 into microsoft:main May 10, 2023
66 checks passed
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.

std::hash<gsl::not_null<T>> should really be constrained
2 participants