Add a Symbolic::FixedExpr helper expression to make sure the compiler fully optimize the usage of last and end.

This commit is contained in:
Gael Guennebaud
2017-01-18 23:16:32 +01:00
parent 15471432fe
commit f3ccbe0419
3 changed files with 15 additions and 1 deletions

View File

@@ -378,6 +378,7 @@ public:
Index size() const { return (m_last-m_first+m_incr)/m_incr; }
Index operator[](Index i) const { return m_first + i * m_incr; }
Index first() const { return m_first; }
const FirstType& firstObject() const { return m_first; }
const LastType& lastObject() const { return m_last; }