diff --git a/src/Magnum/Math/Bezier.h b/src/Magnum/Math/Bezier.h index 7920bf914..a40051769 100644 --- a/src/Magnum/Math/Bezier.h +++ b/src/Magnum/Math/Bezier.h @@ -113,7 +113,8 @@ template class Bezier { * @p i should not be larger than @ref Order. */ Vector& operator[](std::size_t i) { return _data[i]; } - constexpr Vector operator[](std::size_t i) const { return _data[i]; } /**< @overload */ + /* returns const& so [][] operations are also constexpr */ + constexpr const Vector& operator[](std::size_t i) const { return _data[i]; } /**< @overload */ /** * @brief Interpolate the curve at given position