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 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