-
Notifications
You must be signed in to change notification settings - Fork 738
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
Checks in not_null. #604
Comments
This is addressed in this PR #650 by not checking nullness in get. |
ericLemanissier
added a commit
to ericLemanissier/GSL
that referenced
this issue
May 2, 2018
based on @xaxxon's work fixes microsoft#649 fixes microsoft#604
Is there a reason to keep this open? As far as I can see it is solved.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current implementation of not_null does checks (by Expects and Ensures):
This could be an overhead in case you use not_null quite a lot and pass it everywhere by value and leave the Expects()/Ensures() checks even in the Release build (my case). Is this intended or should the check really be only in raw-pointer constructor?
I don't see any sense in those additional checks for not_null<raw_pointer> types, because they can't suddenly become null in the middle of their lifetime. If this is not intended I can prepare a PR with single check. It also should fix #535 because currently copy constructor is not used for non-const_ref not_null copies.
The text was updated successfully, but these errors were encountered: