From acd08900c9992de386c7ded14a593b2ba0a0f20e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 10 Jan 2017 10:31:07 +0100 Subject: [PATCH] Move 'last' and 'end' to their own namespace --- Eigen/src/Core/ArithmeticSequence.h | 4 ++++ test/indexed_view.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Eigen/src/Core/ArithmeticSequence.h b/Eigen/src/Core/ArithmeticSequence.h index 6c9cb9ef3..88954b4a6 100644 --- a/Eigen/src/Core/ArithmeticSequence.h +++ b/Eigen/src/Core/ArithmeticSequence.h @@ -154,9 +154,13 @@ protected: struct symb_last_tag {}; +namespace placeholders { + static const symbolic_value last; static const symbolic_add,symbolic_value_wrapper> end(last+1); +} // end namespace placeholders + //-------------------------------------------------------------------------------- // integral constant //-------------------------------------------------------------------------------- diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 13eb1ef35..e04fe0cd4 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -43,6 +43,9 @@ bool match(const T& xpr, std::string ref, std::string str_xpr = "") { void check_indexed_view() { + using Eigen::placeholders::last; + using Eigen::placeholders::end; + Index n = 10; ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ptr_fun(encode));