diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-02-19 14:05:22 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-02-19 14:05:22 +0100 |
commit | 2cfc025bdaf36f3e4693a48db48ba2366b281cfc (patch) | |
tree | 23da9c8143590545d0af71e86b33a2da5b939ccd | |
parent | ab78cabd39a09dc8e30b1d522fae67ab90c6802d (diff) |
fix unit compilation in c++17: std::ptr_fun has been removed.
-rw-r--r-- | test/indexed_view.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 6d6ef0cd4..5f1e01fc8 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -95,7 +95,11 @@ void check_indexed_view() ArrayXd a = ArrayXd::LinSpaced(n,0,n-1); Array<double,1,Dynamic> b = a.transpose(); - ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ptr_fun(encode)); + #if EIGEN_COMP_CXXVER>=14 + ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ref(encode)); + #else + ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ptr_fun(&encode)); + #endif for(Index i=0; i<n; ++i) for(Index j=0; j<n; ++j) |