diff --git a/src/sage/symbolic/ginac/archive.cpp b/src/sage/symbolic/ginac/archive.cpp index bd078895da0..0362d397ec1 100644 --- a/src/sage/symbolic/ginac/archive.cpp +++ b/src/sage/symbolic/ginac/archive.cpp @@ -581,7 +581,7 @@ void archive::clear() /** Delete cached unarchived expressions in all archive_nodes (mainly for debugging). */ void archive::forget() { - for_each(nodes.begin(), nodes.end(), std::mem_fun_ref(&archive_node::forget)); + std::for_each(nodes.begin(), nodes.end(), [](archive_node &node) { node.forget(); }); } /** Delete cached unarchived expressions from node (for debugging). */