Skip to content

[SYCL][ABI] Guard old operator== function members and provide friend free functions#22461

Open
Robertkq wants to merge 2 commits into
intel:syclfrom
Robertkq:Robertkq/22455
Open

[SYCL][ABI] Guard old operator== function members and provide friend free functions#22461
Robertkq wants to merge 2 commits into
intel:syclfrom
Robertkq:Robertkq/22455

Conversation

@Robertkq

@Robertkq Robertkq commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #22455

This PR adds guards for removing the member operator== functions in the next major release and replaces them with free friend functions as per SYCL 2020 specifications

@Robertkq Robertkq requested a review from a team as a code owner June 27, 2026 15:44

@uditagarwal97 uditagarwal97 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. It won't be an ABI break because we are guarding the change with __INTEL_PREVIEW_BREAKING_CHANGES. No need to update the Release notes for now, we update them once just before every release, not on every commit.

Copilot AI 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.

Pull request overview

Aligns sycl::platform equality/inequality operators with SYCL 2020 by guarding the legacy member operator==/!= under __INTEL_PREVIEW_BREAKING_CHANGES and introducing SYCL 2020-style hidden friend free operators for the preview-breaking configuration.

Changes:

  • Add __INTEL_PREVIEW_BREAKING_CHANGES guard around existing platform::operator==/!= member functions.
  • Provide hidden friend operator==/!= free functions in the breaking-changes configuration (SYCL 2020 style).

Comment thread sycl/include/sycl/platform.hpp Outdated
friend bool operator!=(const platform &lhs, const platform &rhs) {
return !(lhs == rhs);
}
#endif
@uditagarwal97

uditagarwal97 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Also, as a general feedback, PR's description should only summarize the PR changes, along with its motivation, and other relevant info (if any). Anything other than that (like questions) should be added as a comment to the PR. Once we merge the PR, the PR description becomes the commit message as is, so it should be concise.

@Robertkq

Copy link
Copy Markdown
Contributor Author

@uditagarwal97 Got it. Also, I know it's not an ABI/API break directly but an upcoming one. I hope the PR is good to go then -- I left the body of the PR more concise to the changes

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 platform::operator== and operator!= with SYCL 2020

3 participants