From e5fd5b56f873fac53356cdda625015afa86df8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 12 Dec 2016 19:43:14 +0100 Subject: [PATCH] Math: document why RectangularMatrix::operator[] returns const&. --- src/Magnum/Math/RectangularMatrix.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 3a6303bda..6c5cbb60c 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -183,6 +183,7 @@ template class RectangularMatrix { * @see @ref row(), @ref data() */ Vector& operator[](std::size_t col) { return _data[col]; } + /* returns const& so [][] operations are also constexpr */ constexpr const Vector& operator[](std::size_t col) const { return _data[col]; } /**< @overload */ /**