From 8f2497915fa237bc0de2146f8b04dfd2178721af Mon Sep 17 00:00:00 2001 From: AlexandreSinger Date: Sat, 23 Nov 2024 21:41:49 -0500 Subject: [PATCH] [NDMatrix] Removed Template ID From Constructors This change was originally proposed by @heshpdx c++20 disallows template IDs from the constructor of templated classes. This is a strange thing to do anyways and was likely done by mistake. Removed the template IDs from both the standard constructor and the copy constructor. --- libs/libvtrutil/src/vtr_ndmatrix.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/libvtrutil/src/vtr_ndmatrix.h b/libs/libvtrutil/src/vtr_ndmatrix.h index dc69c7f60ba..57571cc8654 100644 --- a/libs/libvtrutil/src/vtr_ndmatrix.h +++ b/libs/libvtrutil/src/vtr_ndmatrix.h @@ -34,12 +34,12 @@ class NdMatrixProxy { * @param dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension) * @param start: Pointer to the start of the sub-matrix this proxy represents */ - NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_strides, T* start) + NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_strides, T* start) : dim_sizes_(dim_sizes) , dim_strides_(dim_strides) , start_(start) {} - NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete; + NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete; ///@brief const [] operator const NdMatrixProxy operator[](size_t index) const { @@ -76,12 +76,12 @@ class NdMatrixProxy { * @param dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension) * @param start: Pointer to the start of the sub-matrix this proxy represents */ - NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_stride, T* start) + NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_stride, T* start) : dim_sizes_(dim_sizes) , dim_strides_(dim_stride) , start_(start) {} - NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete; + NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete; ///@brief const [] operator const T& operator[](size_t index) const { @@ -407,3 +407,4 @@ using Matrix = NdMatrix; } // namespace vtr #endif +