[SYCL][ABI] Guard old operator== function members and provide friend free functions#22461
[SYCL][ABI] Guard old operator== function members and provide friend free functions#22461Robertkq wants to merge 2 commits into
Conversation
uditagarwal97
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_CHANGESguard around existingplatform::operator==/!=member functions. - Provide hidden friend
operator==/!=free functions in the breaking-changes configuration (SYCL 2020 style).
| friend bool operator!=(const platform &lhs, const platform &rhs) { | ||
| return !(lhs == rhs); | ||
| } | ||
| #endif |
|
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. |
|
@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 |
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