mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
provide erase_on_exit ctor
This commit is contained in:
committed by
Christian Mazakas
parent
53e4531295
commit
e6f911e815
@ -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;}
|
||||
|
Reference in New Issue
Block a user