Move 'last' and 'end' to their own namespace

This commit is contained in:
Gael Guennebaud 2017-01-10 10:31:07 +01:00
parent 1df2377d78
commit acd08900c9
2 changed files with 7 additions and 0 deletions

View File

@ -154,9 +154,13 @@ protected:
struct symb_last_tag {};
namespace placeholders {
static const symbolic_value<symb_last_tag> last;
static const symbolic_add<symbolic_value<symb_last_tag>,symbolic_value_wrapper> end(last+1);
} // end namespace placeholders
//--------------------------------------------------------------------------------
// integral constant
//--------------------------------------------------------------------------------

View File

@ -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));