Skip to content

Commit

Permalink
sagemathgh-38912: Replace deprecated/removed mem_fun_ref
Browse files Browse the repository at this point in the history
    
Fixes
```
../src/sage/symbolic/ginac/archive.cpp(584): error C2039: 'mem_fun_ref':
is not a member of 'std'
C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\sstream(19):
note: see declaration of 'std'
../src/sage/symbolic/ginac/archive.cpp(584): error C3861: 'mem_fun_ref':
identifier not found
../src/sage/symbolic/ginac/archive.cpp(584): error C2672: 'for_each': no
matching overloaded function found
```
with  C++17.

Extracted from sagemath#38872.

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38912
Reported by: Tobias Diez
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Nov 14, 2024
2 parents 86febcc + d0e35b2 commit 461bb11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/symbolic/ginac/archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down

0 comments on commit 461bb11

Please sign in to comment.