
23 Sep
2005
23 Sep
'05
5:45 p.m.
David Abrahams wrote:
Jason Stewart <jstewart@pobox.com> writes:
However, maybe using the shared_ptr semantics would work. I.e. if you can create a guard that is "uninitialized" and then reset it later to an active guard.
reset() is wrong unless you mean the guard to immediately take it would take upon destruction. release() would be the correct smart pointer analogy.
I don't really think that smart pointers analogies are applicable in the first place. The guard is not a pointer, so let's not confuse users with such parallels.