Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::ptr_fun deprecatd in C++11 and removed in C++17 #1080

Closed
jpg85 opened this issue Dec 15, 2020 · 1 comment · Fixed by #1081
Closed

std::ptr_fun deprecatd in C++11 and removed in C++17 #1080

jpg85 opened this issue Dec 15, 2020 · 1 comment · Fixed by #1081

Comments

@jpg85
Copy link

jpg85 commented Dec 15, 2020

std::replace_if(_name.begin(), _name.end(), std::not1(std::ptr_fun(isalnum)), '_');

Function should be replaced with alternative. Since boost is already being used, "boost::ptr_fun" should be a direct replacement.

chwarr added a commit to chwarr/bond that referenced this issue Dec 15, 2020
`std::ptr_fun` is deprecated in C++11 and removed in C++17.

Replace its one use with a lambda.

Fixes microsoft#1080
@chwarr
Copy link
Member

chwarr commented Dec 15, 2020

Looks like a lambda works too. Proposed fix is in PR.

chwarr added a commit that referenced this issue Dec 16, 2020
`std::ptr_fun` is deprecated in C++11 and removed in C++17.

Replace its one use with a lambda.

Fixes #1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants