provide erase_on_exit ctor

This commit is contained in:
joaquintides authored and Christian Mazakas committed 2023-01-30 13:55:50 -08:00
1 parent 53e4531295
commit e6f911e815
1 file changed
+1
+1
View File
@@ -1570,6 +1570,7 @@ private:
struct erase_on_exit
{
erase_on_exit(table& x_,iterator it_):x{x_},it{it_}{}
~erase_on_exit(){if(!rollback_)x.erase(it);}
void rollback(){rollback_=true;}