-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
docs: re-written no-value policies #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very different style and approach to the preceding docs. It'll be interesting to see how people react! Otherwise lots of great stuff in there, thank you.
``` | ||
|
||
The compiler can see that if `pi` is null, the program would have undefined | ||
behavior. Since undefined behavior is never the programmers intention, the compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since undefined behaviour is required by the C++ standard to be never the programmer's intention
The compiler can see that if `pi` is null, the program would have undefined | ||
behavior. Since undefined behavior is never the programmers intention, the compiler | ||
assumes that apparently this function is never called with `pi == nullptr`. If so, | ||
`j` is always `0` and the code can be transformed to a faster one: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j
is always nullptr
No description provided.