-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Documentation #10
Documentation #10
Conversation
ADOBE_NONCRITICAL_PRECONDITION_CHECK will just use the precondition kind.
da92b7b
to
a66fd79
Compare
- `message`: an expression convertible to `const char*` pointing to a | ||
[null-terminated](https://en.cppreference.com/w/cpp/string/byte) | ||
message that is additionally passed to the violation handler. The | ||
default value is the empty string, `""`. |
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.
Is nullptr
allowed for the message? In a macro I believe we can force a string literal by using "" message
.
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.
Does nullptr
point to a null-terminated byte string? I think not.
In a macro I believe we can force a string literal by using "" message.
I don't understand what you're suggesting.
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.
@sean-parent I get it now. But why would we want to do that?
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.
By ensuring a string literal, you don't have to deal with null and lifetime if it escapes (on the down side, you can't build a message at runtime).
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.
It can only escape if you return or throw from your handler. Are you sure it's worth it? People can do any number of other bad things in their handlers too.
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.
I left comments for requested changes.
No description provided.