56 #define _GLIBCXX_LIST 1
58 #pragma GCC system_header
70 #if __cplusplus >= 201703L
71 namespace std _GLIBCXX_VISIBILITY(default)
73 _GLIBCXX_BEGIN_NAMESPACE_VERSION
76 template<
typename _Tp>
class polymorphic_allocator;
77 template<
typename _Tp>
80 _GLIBCXX_END_NAMESPACE_VERSION
84 #if __cplusplus > 201703L
85 namespace std _GLIBCXX_VISIBILITY(default)
87 _GLIBCXX_BEGIN_NAMESPACE_VERSION
89 #define __cpp_lib_erase_if 202002L
91 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
92 inline typename list<_Tp, _Alloc>::size_type
93 erase_if(list<_Tp, _Alloc>& __cont, _Predicate __pred)
94 {
return __cont.remove_if(__pred); }
96 template<
typename _Tp,
typename _Alloc,
typename _Up>
97 inline typename list<_Tp, _Alloc>::size_type
98 erase(list<_Tp, _Alloc>& __cont,
const _Up& __value)
100 using __elem_type =
typename list<_Tp, _Alloc>::value_type;
101 return std::erase_if(__cont, [&](__elem_type& __elem) {
102 return __elem == __value;
105 _GLIBCXX_END_NAMESPACE_VERSION
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...