From 3d38135ae29e8b83287c676053315df80800f436 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Thu, 26 Mar 2020 07:39:00 -0400 Subject: [PATCH] Add const qualifiers to HIP_vector_type unary arithmetic operators (#1965) Resolves issue #1960 --- include/hip/hcc_detail/hip_vector_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;