-
Notifications
You must be signed in to change notification settings - Fork 17
Providing explicit documentation for throwing an exception when no bu… #21
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
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.
Looks good, some minor comments on the wording.
placeholder_accessors/index.md
Outdated
|
||
```cpp | ||
bool accessor<T, Dim, Mode, Target, Placeholder>::has_buffer() const noexcept | ||
{ |
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.
We don't need to define the member function here, just provide the declaration and then describe what they should do.
placeholder_accessors/index.md
Outdated
|
||
void handler::require(buffer<T, dim> b, | ||
accessor<T, dim, mode, target, access::placeholder::true_t> a) | ||
{ |
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.
We don't need to define the member function here, just provide the declaration and then describe what they should do.
placeholder_accessors/index.md
Outdated
|
||
### `accessor`s without buffers |
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.
accessor
s without buffers -> Placeholder accessor
without a buffer.
placeholder_accessors/index.md
Outdated
|
||
### `accessor`s without buffers | ||
|
||
If a placeholder accessor is not tied to a buffer within a command group, then |
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.
If a placeholder accessor
-> If a placeholder accessor which was not constructed with a buffer
.
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.
@AerialMantis @Ruyk, for your review
placeholder_accessors/index.md
Outdated
an exception is thrown. | ||
If a placeholder accessor which was not constructed with a buffer is not tied | ||
to a buffer within a command group, then an exception is thrown. An accessor | ||
can be checked for a buffer using `has_buffer()`. |
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.
for the existence of an associated buffer
placeholder_accessors/index.md
Outdated
``` | ||
|Member function |Description | | ||
|-----------------|---------------------------------------------------------| | ||
|bool has_buffer()|Returns true if the accessor is associated with a buffer,| |
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.
bool has_buffer() const
to prevent side effects
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.
Oops!
@Ruyk for your review |
…ffer exists.