diff --git a/sycl/include/sycl/ext/oneapi/bfloat16.hpp b/sycl/include/sycl/ext/oneapi/bfloat16.hpp index 70b96a3976d39..18f53a41b0a5f 100644 --- a/sycl/include/sycl/ext/oneapi/bfloat16.hpp +++ b/sycl/include/sycl/ext/oneapi/bfloat16.hpp @@ -182,7 +182,7 @@ class bfloat16 { explicit operator bool() { return to_float(value) != 0.0f; } // Unary minus operator overloading - friend bfloat16 operator-(bfloat16 &lhs) { + friend bfloat16 operator-(const bfloat16 &lhs) { #if defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__) && \ (__SYCL_CUDA_ARCH__ >= 800) detail::Bfloat16StorageT res;