diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 0ff059e43e2fe..b94691a023db4 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 // __INTEL_PREVIEW_BREAKING_CHANGES /// Returns an OpenCL interoperability platform. ///