mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Selectively add constexpr to Core expression template scaffolding
libeigen/eigen!2184 Closes #3041 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -168,13 +168,13 @@ class ArrayBase : public DenseBase<Derived> {
|
||||
}
|
||||
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC ArrayBase<Derived>& array() { return *this; }
|
||||
EIGEN_DEVICE_FUNC const ArrayBase<Derived>& array() const { return *this; }
|
||||
EIGEN_DEVICE_FUNC constexpr ArrayBase<Derived>& array() { return *this; }
|
||||
EIGEN_DEVICE_FUNC constexpr const ArrayBase<Derived>& array() const { return *this; }
|
||||
|
||||
/** \returns an \link Eigen::MatrixBase Matrix \endlink expression of this array
|
||||
* \sa MatrixBase::array() */
|
||||
EIGEN_DEVICE_FUNC MatrixWrapper<Derived> matrix() { return MatrixWrapper<Derived>(derived()); }
|
||||
EIGEN_DEVICE_FUNC const MatrixWrapper<const Derived> matrix() const {
|
||||
EIGEN_DEVICE_FUNC constexpr MatrixWrapper<Derived> matrix() { return MatrixWrapper<Derived>(derived()); }
|
||||
EIGEN_DEVICE_FUNC constexpr const MatrixWrapper<const Derived> matrix() const {
|
||||
return MatrixWrapper<const Derived>(derived());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user