-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
not_null cannot (and should not) be used with span #399
Comments
Discussed on 12-8. We are still are inclined to enable |
Editors discussed 8 Dec 2015. |
Thanks for your consideration. As I just mentioned in microsoft/GSL#202, if you insist on legitimising the concept of a "null span", you could introduce a special
I consider the concept of a "null array" to be conceptually unsound, but this seems like it would be a reasonable compromise. |
Editors discussed 14 Dec 2015 |
Herb, please write this up. Per our discussion, suggest that we don't allow |
F.18 suggests that
not_null
can be used withspan
andstring_span
, but my tests would suggest otherwise. This behaviour seems correct, as arrays and strings cannot be null (nullstd::array
orstd::string
anyone?) Indeed,span
'soperator bool()
tests for "empty" status, and trying to compare aspan
withnullptr
results in a compiler error.The text was updated successfully, but these errors were encountered: