From 47c2775490824ff1937d8fc2017434c9162cdd34 Mon Sep 17 00:00:00 2001 From: Robertkq Date: Sat, 27 Jun 2026 18:35:10 +0300 Subject: [PATCH 1/2] Guard old operator== function members and provide friend free functions --- sycl/include/sycl/platform.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 0ff059e43e2fe..9cea614f4f744 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -114,9 +114,19 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase { platform &operator=(platform &&rhs) = default; +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES bool operator==(const platform &rhs) const { return impl == rhs.impl; } bool operator!=(const platform &rhs) const { return !(*this == rhs); } +#else + friend bool operator==(const platform &lhs, const platform &rhs) { + return lhs.impl == rhs.impl; + } + + friend bool operator!=(const platform &lhs, const platform &rhs) { + return !(lhs == rhs); + } +#endif /// Returns an OpenCL interoperability platform. /// From 6ae4779c743fe39aa36350b04c216ba42839be8a Mon Sep 17 00:00:00 2001 From: Robertkq Date: Sun, 28 Jun 2026 12:19:07 +0300 Subject: [PATCH 2/2] Add trailing comment for #endif directive --- sycl/include/sycl/platform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 9cea614f4f744..b94691a023db4 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -126,7 +126,7 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase { friend bool operator!=(const platform &lhs, const platform &rhs) { return !(lhs == rhs); } -#endif +#endif // __INTEL_PREVIEW_BREAKING_CHANGES /// Returns an OpenCL interoperability platform. ///