Boost logo

Boost Users :

Subject: Re: [Boost-users] how to release element from ptr_map?
From: archie14 (admin_at_[hidden])
Date: 2010-07-28 12:55:26

Thorsten Ottosen <nesotto <at>> writes:

> archie14 skrev:
> > I have an instance of ptr_map<int, classA>. I need to release an element
from the map and use it somewhere else...
> Does
> ptrmaptype::auto_type ptr = val.release(val.begin());
> not work??
> Then you can call ptr.release() to get the naked ptr.
> -Thorsten

Yes, it works, thanks for the help. I think that I started with auto_type, got
compile error and moved to try other types. Now it works. Thanks again.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at