From a5b1aa08e05eb4b24b28b60a1cd10875353a9a92 Mon Sep 17 00:00:00 2001 From: Norbert Nopper Date: Tue, 28 Jan 2025 12:10:12 +0100 Subject: Added const version for the operator[] in Matrix (#6186) Co-authored-by: Yong He --- prelude/slang-cpp-types-core.h | 1 + 1 file changed, 1 insertion(+) diff --git a/prelude/slang-cpp-types-core.h b/prelude/slang-cpp-types-core.h index 6c0bb7544..1f8f5bd80 100644 --- a/prelude/slang-cpp-types-core.h +++ b/prelude/slang-cpp-types-core.h @@ -392,6 +392,7 @@ template struct Matrix { Vector rows[ROWS]; + const Vector& operator[](size_t index) const { return rows[index]; } Vector& operator[](size_t index) { return rows[index]; } Matrix() = default; Matrix(T scalar) -- cgit v1.2.3