mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
fix unit compilation in c++17: std::ptr_fun has been removed.
This commit is contained in:
parent
ab78cabd39
commit
2cfc025bda
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user