Skip to content

[SYCL][Doc] Clarify availability of get_property() #5992

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

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

Pennycook
Copy link
Contributor

The extension previously said that certain calls to get_property()
must produce a compiler error, which could be satisfied by calling
static_assert(). A static_assert()-based solution throws errors
any time the get_property<> template is instantiated, which can
lead to some surprising errors in user code.

Stating that get_property() must only be available when the property
type exists in the property list has two advantages:

  1. Users can more easily reason about when errors will be thrown and
    how to avoid those errors.

  2. Users can rely on all implementations to have the same error
    behavior.

Signed-off-by: John Pennycook [email protected]

The extension previously said that certain calls to get_property()
must produce a compiler error, which could be satisfied by calling
static_assert(). A static_assert()-based solution throws errors
any time the get_property<> template is instantiated, which can
lead to some surprising errors in user code.

Stating that get_property() must only be available when the property
type exists in the property list has two advantages:

1) Users can more easily reason about when errors will be thrown and
   how to avoid those errors.

2) Users can rely on all implementations to have the same error
   behavior.

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the spec extension All issues/PRs related to extensions specifications label Apr 8, 2022
@Pennycook Pennycook requested a review from a team as a code owner April 8, 2022 18:14
@steffenlarsen steffenlarsen merged commit a2c5e90 into intel:sycl Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec extension All issues/PRs related to extensions specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants