diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-09-17 16:24:52 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-09-17 16:24:52 +0200 |
commit | 297ca623199017bcc548d72dca0570c02edbeb6d (patch) | |
tree | 1a8e70e3a6a8788f2a5f2ad70fe524d0db138657 | |
parent | 2014c7ae28c592063f6887632682231ed862cfc5 (diff) |
ease transition by adding placeholders::all/last/and as deprecated
-rw-r--r-- | Eigen/src/Core/util/IndexedViewHelper.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Eigen/src/Core/util/IndexedViewHelper.h b/Eigen/src/Core/util/IndexedViewHelper.h index 3ec3dd7bd..40e16fdb4 100644 --- a/Eigen/src/Core/util/IndexedViewHelper.h +++ b/Eigen/src/Core/util/IndexedViewHelper.h @@ -28,14 +28,14 @@ struct symbolic_last_tag {}; * A typical usage example would be: * \code * using namespace Eigen; - * using Eigen::placeholders::last; + * using Eigen::last; * VectorXd v(n); * v(seq(2,last-2)).setOnes(); * \endcode * * \sa end */ -static const symbolic::SymbolExpr<internal::symbolic_last_tag> last; +static const symbolic::SymbolExpr<internal::symbolic_last_tag> last; // PLEASE use Eigen::last instead of Eigen::placeholders::last /** \var lastp1 * \ingroup Core_Module @@ -168,7 +168,18 @@ template<int Size> struct get_compile_time_incr<AllRange<Size> > { * \ingroup Core_Module * Can be used as a parameter to DenseBase::operator()(const RowIndices&, const ColIndices&) to index all rows or columns */ -static const Eigen::internal::all_t all; +static const Eigen::internal::all_t all; // PLEASE use Eigen::all instead of Eigen::placeholders::all + + +namespace placeholders { + typedef symbolic::SymbolExpr<internal::symbolic_last_tag> last_t; + typedef symbolic::AddExpr<symbolic::SymbolExpr<internal::symbolic_last_tag>,symbolic::ValueExpr<Eigen::internal::FixedInt<1> > > end_t; + typedef Eigen::internal::all_t all_t; + + EIGEN_DEPRECATED static const all_t all = Eigen::all; // PLEASE use Eigen::all instead of Eigen::placeholders::all + EIGEN_DEPRECATED static const last_t last = Eigen::last; // PLEASE use Eigen::last instead of Eigen::placeholders::last + EIGEN_DEPRECATED static const end_t end = Eigen::lastp1; // PLEASE use Eigen::lastp1 instead of Eigen::placeholders::end +} } // end namespace Eigen |