Skip to content

[SYCL] Align item with SYCL 2020 - #22907

Open
crystarm wants to merge 2 commits into
intel:syclfrom
crystarm:item-noexcept-hidden-friends
Open

[SYCL] Align item with SYCL 2020#22907
crystarm wants to merge 2 commits into
intel:syclfrom
crystarm:item-noexcept-hidden-friends

Conversation

@crystarm

Copy link
Copy Markdown
Contributor

Closes #22870.

Align sycl::item with the SYCL 2020 specification:

  • Add noexcept to the item query and conversion functions.
  • Add noexcept to operator== and operator!=.
  • Implement the equality operators as hidden friends.
  • Add compile-time tests covering the exception specifications and hidden-friend lookup.

@crystarm
crystarm requested a review from a team as a code owner August 10, 2026 13:27
@crystarm
crystarm marked this pull request as draft August 10, 2026 13:27
@crystarm
crystarm force-pushed the item-noexcept-hidden-friends branch from b2f7306 to 8ddab7b Compare August 10, 2026 13:41
@crystarm
crystarm marked this pull request as ready for review August 10, 2026 13:42
@crystarm

Copy link
Copy Markdown
Contributor Author

The original change applied noexcept to the equality operators as well as to the item query and conversion API. However, equality is specified by the common by-value interface in Table 10, where the hidden-friend declarations do not carry noexcept.

This follow-up keeps the hidden-friend implementation, drops the additional public exception guarantee, and strengthens the test against accidental member operators.

@KornevNikita KornevNikita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @crystarm please update the description

@KornevNikita

Copy link
Copy Markdown
Contributor

@sergey-semenov could you take a look please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align item with SYCL 2020

2 participants