Když diskuse,tak s LopuchemLopuch.cz
#if __cplusplus >= 201103L erase(const_iterator __position) noexcept; #else erase(iterator __position); #endif
#include <list> using namespace std; int main() { list<int> test; test.push_back(5); test.push_back(2); list<int>::const_iterator lit; for (lit = test.begin(); lit != test.end(); ++lit) { test.erase(lit); return 0; } }