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

LWG-4135 The helper lambda of std::erase for list should specify return type as bool #5117

Open
StephanTLavavej opened this issue Nov 24, 2024 · 0 comments
Labels
LWG Library Working Group issue

Comments

@StephanTLavavej
Copy link
Member

LWG-4135 The helper lambda of std::erase for list should specify return type as bool

This was almost fully implemented by #4900, but the issue resolution also added const which we don't have:

STL/stl/inc/forward_list

Lines 1618 to 1619 in 5e0ddad

forward_list<_Ty, _Alloc>::size_type erase(forward_list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
return _Cont.remove_if([&](_Ty& _Elem) -> bool { return _Elem == _Val; });

STL/stl/inc/list

Lines 1923 to 1924 in 5e0ddad

list<_Ty, _Alloc>::size_type erase(list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
return _Cont.remove_if([&](_Ty& _Elem) -> bool { return _Elem == _Val; });

@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Nov 24, 2024
@github-project-automation github-project-automation bot moved this to Available in STL LWG Issues Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
Status: Available
Development

No branches or pull requests

1 participant