diff --git a/include/hip/hcc_detail/hip_vector_types.h b/include/hip/hcc_detail/hip_vector_types.h index 7a91b6a532..19259a3657 100644 --- a/include/hip/hcc_detail/hip_vector_types.h +++ b/include/hip/hcc_detail/hip_vector_types.h @@ -694,7 +694,7 @@ THE SOFTWARE. typename U = T, typename std::enable_if{}>::type* = nullptr> inline __host__ __device__ - HIP_vector_type operator-() noexcept + HIP_vector_type operator-() const noexcept { auto tmp(*this); tmp.data = -tmp.data; @@ -705,7 +705,7 @@ THE SOFTWARE. typename U = T, typename std::enable_if{}>::type* = nullptr> inline __host__ __device__ - HIP_vector_type operator~() noexcept + HIP_vector_type operator~() const noexcept { HIP_vector_type r{*this}; r.data = ~r.data;