aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2018-08-16 11:24:37 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2018-08-16 11:24:37 -0700
commitf641cf1253bc2f7388b632a50b818b9d15b7588d (patch)
treecfd5f6f5f70c4451a6d6630d04893531458faade /unsupported
parentede580ccdac3b964bdfcf12d55560a268c366c3c (diff)
Adding missing at method in Eigen::array
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/CXX11/src/util/EmulateArray.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/util/EmulateArray.h b/unsupported/Eigen/CXX11/src/util/EmulateArray.h
index d91662d96..32db51592 100644
--- a/unsupported/Eigen/CXX11/src/util/EmulateArray.h
+++ b/unsupported/Eigen/CXX11/src/util/EmulateArray.h
@@ -26,6 +26,11 @@ template <typename T, size_t n> class array {
EIGEN_STRONG_INLINE const T& operator[] (size_t index) const { return values[index]; }
EIGEN_DEVICE_FUNC
+ EIGEN_STRONG_INLINE T& at(size_t index) { eigen_assert(index < size()); return values[index]; }
+ EIGEN_DEVICE_FUNC
+ EIGEN_STRONG_INLINE const T& at(size_t index) const { eigen_assert(index < size()); return values[index]; }
+
+ EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T& front() { return values[0]; }
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const T& front() const { return values[0]; }